Selecting system fonts depending on some features

Kornel Benko kornel at lyx.org
Fri May 1 12:59:44 UTC 2020


In the struggle of gathering the relevant info from the fonts,
I came up with a perl script, I would like to commit into lib/scripts.

Following features are handled
1.) language: Select list of desired lang codes (lang1,lang2,... (e.g. de,ko))
2.) name: select list the font name should match (regex1,regex2,... (e.g.
'^a','sans',italic))
3.) name: select list of regexes the font name should not match
4.) properties: select list of desired properties (e.g. serif,medium, ...)
5.) properties: select list of not desired properties (e.g. mono, ...)

Some fonts are difficult to handle, not providing the needed info.
For instance 'Arial'. Only because it is known as 'sans-serif', we do not need
to deduce it from the font-name.

I tried to make the listed font-names to match what we see in LyX.
The exception is the string 'Regular' in font-name. LyX does not have it.

For now the script is named 'listFontWithLang.pl', but maybe a better name
will be more accurate.

	Kornel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: Digitale Signatur von OpenPGP
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20200501/9a61c1aa/attachment.asc>


More information about the lyx-devel mailing list