Trying to understand Page.setFontFamilies

83 views
Skip to first unread message

Niranjan Rao

unread,
Nov 30, 2023, 3:13:48 PM11/30/23
to chrome-debugging-protocol

Greetings,


Trying to understand documentation at Page.setFontFamilies. Unfortunately it's not clear to me. Can someone please throw some light about what this method does and how it can be used.


Regards,

Niranjan

--
Niranjan Rao | Sr.Architect
he/his
Paymentus
Paymentus Corporation The Real-Time Bill Payment CompanyTM
860 Hillview Court Suite 220 Milpitas CA 95035
www.paymentus.com

Paul Irish

unread,
Dec 4, 2023, 2:32:32 PM12/4/23
to Niranjan Rao, chrome-debugging-protocol
If you have a style like this:
   body { font-family: sans-serif }

Then, the browser chooses which installed/available font to use for 'sans-serif'. 
It could be "Arial" on Windows, "Helvetica Neue" on Mac/iOS, "Liberation Sans" on Linux, and "Roboto" on Android.

That CDP method allows you to define what font families should be used for these fixed aliases. Page.FontFamilies




--
You received this message because you are subscribed to the Google Groups "chrome-debugging-protocol" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chrome-debugging-p...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/chrome-debugging-protocol/52abc67c-3a0a-43d0-a523-b4b8dac40ce6%40paymentus.com.
Reply all
Reply to author
Forward
0 new messages