[LyX/master] Personalize fonts
Enrico Forestieri
forenr at lyx.org
Thu Sep 3 15:32:52 UTC 2020
commit a9afdbb73c7ee568eeabd2848e9996322e4d5c85
Author: Enrico Forestieri <forenr at lyx.org>
Date: Thu Sep 3 17:46:30 2020 +0200
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.
---
lib/fonts/cmex10.sfd | 1 +
lib/fonts/cmex10.ttf | Bin 20688 -> 20688 bytes
lib/fonts/cmmi10.sfd | 2 +-
lib/fonts/cmmi10.ttf | Bin 32036 -> 32044 bytes
lib/fonts/cmr10.sfd | 1 +
lib/fonts/cmr10.ttf | Bin 26188 -> 26188 bytes
lib/fonts/cmsy10.sfd | 2 +-
lib/fonts/cmsy10.ttf | Bin 28476 -> 28484 bytes
lib/fonts/dsrom10.sfd | 2 +-
lib/fonts/dsrom10.ttf | Bin 9944 -> 9944 bytes
lib/fonts/esint10.sfd | 2 +-
lib/fonts/esint10.ttf | Bin 27700 -> 27700 bytes
lib/fonts/eufm10.sfd | 1 +
lib/fonts/eufm10.ttf | Bin 23476 -> 23476 bytes
lib/fonts/msam10.sfd | 2 +-
lib/fonts/msam10.ttf | Bin 26620 -> 26628 bytes
lib/fonts/msbm10.sfd | 2 +-
lib/fonts/msbm10.ttf | Bin 36460 -> 36468 bytes
lib/fonts/rsfs10.sfd | 2 +-
lib/fonts/rsfs10.ttf | Bin 10924 -> 10932 bytes
lib/fonts/stmary10.sfd | Bin 126101 -> 126101 bytes
lib/fonts/stmary10.ttf | Bin 19172 -> 19172 bytes
lib/fonts/wasy10.sfd | 2 +-
lib/fonts/wasy10.ttf | Bin 21292 -> 21292 bytes
src/frontends/qt/GuiFontLoader.cpp | 7 +++++++
25 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/lib/fonts/cmex10.sfd b/lib/fonts/cmex10.sfd
index cea4d9d..8431e86 100644
--- a/lib/fonts/cmex10.sfd
+++ b/lib/fonts/cmex10.sfd
@@ -50,6 +50,7 @@ OS2SupXOff: 0
OS2SupYOff: 0
OS2StrikeYSize: 102
OS2StrikeYPos: 530
+OS2Vendor: 'LyEd'
OS2UnicodeRanges: 00000000.00000000.00000000.00000000
MarkAttachClasses: 1
DEI: 91125
diff --git a/lib/fonts/cmex10.ttf b/lib/fonts/cmex10.ttf
index cf8cd4c..af088f4 100755
Binary files a/lib/fonts/cmex10.ttf and b/lib/fonts/cmex10.ttf differ
diff --git a/lib/fonts/cmmi10.sfd b/lib/fonts/cmmi10.sfd
index da3416a..463e38a 100644
--- a/lib/fonts/cmmi10.sfd
+++ b/lib/fonts/cmmi10.sfd
@@ -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
diff --git a/lib/fonts/cmmi10.ttf b/lib/fonts/cmmi10.ttf
index 9b2b430..6602fd8 100755
Binary files a/lib/fonts/cmmi10.ttf and b/lib/fonts/cmmi10.ttf differ
diff --git a/lib/fonts/cmr10.sfd b/lib/fonts/cmr10.sfd
index 80f8e56..641fe4d 100644
--- a/lib/fonts/cmr10.sfd
+++ b/lib/fonts/cmr10.sfd
@@ -50,6 +50,7 @@ OS2SupXOff: 0
OS2SupYOff: 1186
OS2StrikeYSize: 102
OS2StrikeYPos: 530
+OS2Vendor: 'LyEd'
OS2UnicodeRanges: 00000000.00000000.00000000.00000000
DEI: 91125
TtTable: prep
diff --git a/lib/fonts/cmr10.ttf b/lib/fonts/cmr10.ttf
index e405536..efff9fc 100755
Binary files a/lib/fonts/cmr10.ttf and b/lib/fonts/cmr10.ttf differ
diff --git a/lib/fonts/cmsy10.sfd b/lib/fonts/cmsy10.sfd
index ad7e483..5ae7f20 100644
--- a/lib/fonts/cmsy10.sfd
+++ b/lib/fonts/cmsy10.sfd
@@ -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
diff --git a/lib/fonts/cmsy10.ttf b/lib/fonts/cmsy10.ttf
index 40cb3a8..2544757 100755
Binary files a/lib/fonts/cmsy10.ttf and b/lib/fonts/cmsy10.ttf differ
diff --git a/lib/fonts/dsrom10.sfd b/lib/fonts/dsrom10.sfd
index e2539ce..ef4958f 100644
--- a/lib/fonts/dsrom10.sfd
+++ b/lib/fonts/dsrom10.sfd
@@ -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
diff --git a/lib/fonts/dsrom10.ttf b/lib/fonts/dsrom10.ttf
index 07db01f..aba22e3 100755
Binary files a/lib/fonts/dsrom10.ttf and b/lib/fonts/dsrom10.ttf differ
diff --git a/lib/fonts/esint10.sfd b/lib/fonts/esint10.sfd
index 9cc4a6f..97f31a8 100644
--- a/lib/fonts/esint10.sfd
+++ b/lib/fonts/esint10.sfd
@@ -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' > ) ]
diff --git a/lib/fonts/esint10.ttf b/lib/fonts/esint10.ttf
index 8626dec..87d6b54 100755
Binary files a/lib/fonts/esint10.ttf and b/lib/fonts/esint10.ttf differ
diff --git a/lib/fonts/eufm10.sfd b/lib/fonts/eufm10.sfd
index c80451a..7082f5e 100644
--- a/lib/fonts/eufm10.sfd
+++ b/lib/fonts/eufm10.sfd
@@ -50,6 +50,7 @@ OS2SupXOff: 0
OS2SupYOff: 1239
OS2StrikeYSize: 102
OS2StrikeYPos: 530
+OS2Vendor: 'LyEd'
OS2UnicodeRanges: 00000000.00000000.00000000.00000000
MarkAttachClasses: 1
DEI: 91125
diff --git a/lib/fonts/eufm10.ttf b/lib/fonts/eufm10.ttf
index 0e670d4..da7d5c3 100755
Binary files a/lib/fonts/eufm10.ttf and b/lib/fonts/eufm10.ttf differ
diff --git a/lib/fonts/msam10.sfd b/lib/fonts/msam10.sfd
index 20030cd..4e21436 100644
--- a/lib/fonts/msam10.sfd
+++ b/lib/fonts/msam10.sfd
@@ -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
diff --git a/lib/fonts/msam10.ttf b/lib/fonts/msam10.ttf
index 3b0cd89..cb2db1d 100755
Binary files a/lib/fonts/msam10.ttf and b/lib/fonts/msam10.ttf differ
diff --git a/lib/fonts/msbm10.sfd b/lib/fonts/msbm10.sfd
index de6db27..2453f50 100644
--- a/lib/fonts/msbm10.sfd
+++ b/lib/fonts/msbm10.sfd
@@ -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
diff --git a/lib/fonts/msbm10.ttf b/lib/fonts/msbm10.ttf
index 04a4717..5c92808 100755
Binary files a/lib/fonts/msbm10.ttf and b/lib/fonts/msbm10.ttf differ
diff --git a/lib/fonts/rsfs10.sfd b/lib/fonts/rsfs10.sfd
index 8206bdf..b28f6f4 100644
--- a/lib/fonts/rsfs10.sfd
+++ b/lib/fonts/rsfs10.sfd
@@ -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' > ) ]
diff --git a/lib/fonts/rsfs10.ttf b/lib/fonts/rsfs10.ttf
index 4160bcf..4559b85 100755
Binary files a/lib/fonts/rsfs10.ttf and b/lib/fonts/rsfs10.ttf differ
diff --git a/lib/fonts/stmary10.sfd b/lib/fonts/stmary10.sfd
index c3e35d8..37c4231 100644
Binary files a/lib/fonts/stmary10.sfd and b/lib/fonts/stmary10.sfd differ
diff --git a/lib/fonts/stmary10.ttf b/lib/fonts/stmary10.ttf
index a23f032..328ab6a 100755
Binary files a/lib/fonts/stmary10.ttf and b/lib/fonts/stmary10.ttf differ
diff --git a/lib/fonts/wasy10.sfd b/lib/fonts/wasy10.sfd
index 2276acb..c96fc83 100644
--- a/lib/fonts/wasy10.sfd
+++ b/lib/fonts/wasy10.sfd
@@ -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
diff --git a/lib/fonts/wasy10.ttf b/lib/fonts/wasy10.ttf
index d512ed5..7d0ab92 100755
Binary files a/lib/fonts/wasy10.ttf and b/lib/fonts/wasy10.ttf differ
diff --git a/src/frontends/qt/GuiFontLoader.cpp b/src/frontends/qt/GuiFontLoader.cpp
index 82dafbf..c22c7f1 100644
--- a/src/frontends/qt/GuiFontLoader.cpp
+++ b/src/frontends/qt/GuiFontLoader.cpp
@@ -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");
More information about the lyx-cvs
mailing list