Personalize fonts

When the fonts distributed with texlive with same family name
as ours are also managed by fontconfig, Qt is not able to
discriminate ours by the style only. In order to be sure Qt
will load our fonts, we change the foundry name from 'PfEd'
to 'LyEd' and augment the font family name with this foundry
name. This only works on *nix, because adding a foundry name
seemingly breaks things on Windows. However, this is a *nix
only problem, seemingly.
This commit is contained in:
Enrico Forestieri 2020-09-03 17:46:30 +02:00
parent efc8d44d09
commit a9afdbb73c
25 changed files with 18 additions and 8 deletions

View File

@ -50,6 +50,7 @@ OS2SupXOff: 0
OS2SupYOff: 0
OS2StrikeYSize: 102
OS2StrikeYPos: 530
OS2Vendor: 'LyEd'
OS2UnicodeRanges: 00000000.00000000.00000000.00000000
MarkAttachClasses: 1
DEI: 91125

Binary file not shown.

View File

@ -50,7 +50,7 @@ OS2SupXOff: 0
OS2SupYOff: 1175
OS2StrikeYSize: 102
OS2StrikeYPos: 530
OS2Vendor: 'PfEd'
OS2Vendor: 'LyEd'
OS2CodePages: 00000001.00000000
OS2UnicodeRanges: 00000000.00000000.00000000.00000000
MarkAttachClasses: 1

Binary file not shown.

View File

@ -50,6 +50,7 @@ OS2SupXOff: 0
OS2SupYOff: 1186
OS2StrikeYSize: 102
OS2StrikeYPos: 530
OS2Vendor: 'LyEd'
OS2UnicodeRanges: 00000000.00000000.00000000.00000000
DEI: 91125
TtTable: prep

Binary file not shown.

View File

@ -50,7 +50,7 @@ OS2SupXOff: 0
OS2SupYOff: 723
OS2StrikeYSize: 102
OS2StrikeYPos: 530
OS2Vendor: 'PfEd'
OS2Vendor: 'LyEd'
OS2CodePages: 00000001.00000000
OS2UnicodeRanges: 00000000.00000000.00000000.00000000
MarkAttachClasses: 1

Binary file not shown.

View File

@ -52,7 +52,7 @@ OS2SupXOff: 0
OS2SupYOff: 480
OS2StrikeYSize: 49
OS2StrikeYPos: 258
OS2Vendor: 'PfEd'
OS2Vendor: 'LyEd'
OS2CodePages: 00000001.00000000
OS2UnicodeRanges: 00000001.00000000.00000000.00000000
DEI: 91125

Binary file not shown.

View File

@ -51,7 +51,7 @@ OS2SupXOff: 0
OS2SupYOff: 0
OS2StrikeYSize: 102
OS2StrikeYPos: 530
OS2Vendor: 'PfEd'
OS2Vendor: 'LyEd'
OS2CodePages: 40000001.80d40000
OS2UnicodeRanges: 00000003.00000000.00000000.00000000
Lookup: 4 0 1 "'liga' Ligature standard in Latin lookup 0" { "'liga' Ligature standard in Latin lookup 0 subtable" } ['liga' ('latn' <'dflt' > ) ]

Binary file not shown.

View File

@ -50,6 +50,7 @@ OS2SupXOff: 0
OS2SupYOff: 1239
OS2StrikeYSize: 102
OS2StrikeYPos: 530
OS2Vendor: 'LyEd'
OS2UnicodeRanges: 00000000.00000000.00000000.00000000
MarkAttachClasses: 1
DEI: 91125

Binary file not shown.

View File

@ -50,7 +50,7 @@ OS2SupXOff: 0
OS2SupYOff: 0
OS2StrikeYSize: 102
OS2StrikeYPos: 530
OS2Vendor: 'PfEd'
OS2Vendor: 'LyEd'
OS2CodePages: 00000001.00000000
OS2UnicodeRanges: 00000000.00000000.00000000.00000000
MarkAttachClasses: 1

Binary file not shown.

View File

@ -50,7 +50,7 @@ OS2SupXOff: 0
OS2SupYOff: 721
OS2StrikeYSize: 102
OS2StrikeYPos: 530
OS2Vendor: 'PfEd'
OS2Vendor: 'LyEd'
OS2CodePages: 00000001.00000000
OS2UnicodeRanges: 00000000.00000000.00000000.00000000
MarkAttachClasses: 1

Binary file not shown.

View File

@ -50,7 +50,7 @@ OS2SupXOff: -101
OS2SupYOff: 490
OS2StrikeYSize: 50
OS2StrikeYPos: 264
OS2Vendor: 'PfEd'
OS2Vendor: 'LyEd'
OS2CodePages: 00000001.00000000
OS2UnicodeRanges: 80000001.00000000.00000000.00000000
Lookup: 258 0 0 "'kern' Horizontal Kerning in Latin lookup 0" {"'kern' Horizontal Kerning in Latin lookup 0 subtable" } ['kern' ('latn' <'dflt' > ) ]

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -52,7 +52,7 @@ OS2SupXOff: 0
OS2SupYOff: 0
OS2StrikeYSize: 51
OS2StrikeYPos: 265
OS2Vendor: 'PfEd'
OS2Vendor: 'LyEd'
OS2CodePages: 00000001.00000000
OS2UnicodeRanges: 00000001.00000000.00000000.00000000
MarkAttachClasses: 1

Binary file not shown.

View File

@ -207,7 +207,14 @@ QFont symbolFont(QString const & family, bool * ok)
upper[0] = family[0].toUpper();
QFont font;
#if defined Q_WS_X11 || defined(QPA_XCB)
// On *nix we have to also specify the foundry to be able to
// discriminate our fonts when the texlive fonts are managed by
// fontconfig. Unfortunately, doing the same on Windows breaks things.
font.setFamily(family + QLatin1String(" [LyEd]"));
#else
font.setFamily(family);
#endif
#if QT_VERSION >= 0x040800
font.setStyleName("LyX");