]> git.lyx.org Git - lyx.git/commitdiff
Personalize fonts
authorEnrico Forestieri <forenr@lyx.org>
Thu, 3 Sep 2020 15:46:30 +0000 (17:46 +0200)
committerEnrico Forestieri <forenr@lyx.org>
Thu, 3 Sep 2020 15:46:30 +0000 (17:46 +0200)
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.

25 files changed:
lib/fonts/cmex10.sfd
lib/fonts/cmex10.ttf
lib/fonts/cmmi10.sfd
lib/fonts/cmmi10.ttf
lib/fonts/cmr10.sfd
lib/fonts/cmr10.ttf
lib/fonts/cmsy10.sfd
lib/fonts/cmsy10.ttf
lib/fonts/dsrom10.sfd
lib/fonts/dsrom10.ttf
lib/fonts/esint10.sfd
lib/fonts/esint10.ttf
lib/fonts/eufm10.sfd
lib/fonts/eufm10.ttf
lib/fonts/msam10.sfd
lib/fonts/msam10.ttf
lib/fonts/msbm10.sfd
lib/fonts/msbm10.ttf
lib/fonts/rsfs10.sfd
lib/fonts/rsfs10.ttf
lib/fonts/stmary10.sfd
lib/fonts/stmary10.ttf
lib/fonts/wasy10.sfd
lib/fonts/wasy10.ttf
src/frontends/qt/GuiFontLoader.cpp

index cea4d9d5a67fff04018b0228f021f6bff0869ce8..8431e86d9396977fb7392af9bd81f17380a66b31 100644 (file)
@@ -50,6 +50,7 @@ OS2SupXOff: 0
 OS2SupYOff: 0
 OS2StrikeYSize: 102
 OS2StrikeYPos: 530
+OS2Vendor: 'LyEd'
 OS2UnicodeRanges: 00000000.00000000.00000000.00000000
 MarkAttachClasses: 1
 DEI: 91125
index cf8cd4ce9c2adc0f6dddef936c05ca7376e70e7f..af088f4c6e81202d4347b242aaa109fbe0a56ac9 100755 (executable)
Binary files a/lib/fonts/cmex10.ttf and b/lib/fonts/cmex10.ttf differ
index da3416ae5f50302cd73b3566f2a601beaebd22d2..463e38aa9a4606c2f5138f60ded31227539a6faf 100644 (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
index 9b2b430e5d9fae62ffeaafd4aa5606d06d279cf0..6602fd8b225443191ec5cde89632a536135672d2 100755 (executable)
Binary files a/lib/fonts/cmmi10.ttf and b/lib/fonts/cmmi10.ttf differ
index 80f8e565fb6039a03ecdc01c1cc327ca10f0fd2e..641fe4dd2bbc6c8147c8582cd926f2700b0e436c 100644 (file)
@@ -50,6 +50,7 @@ OS2SupXOff: 0
 OS2SupYOff: 1186
 OS2StrikeYSize: 102
 OS2StrikeYPos: 530
+OS2Vendor: 'LyEd'
 OS2UnicodeRanges: 00000000.00000000.00000000.00000000
 DEI: 91125
 TtTable: prep
index e405536e6d33d30c7d7b505a3b392b6d5f61768f..efff9fcf5982b44da2611bbbb6a877c775668362 100755 (executable)
Binary files a/lib/fonts/cmr10.ttf and b/lib/fonts/cmr10.ttf differ
index ad7e4839becad6cabd5701cd18f51b483d9e13c9..5ae7f207ecd62cc7ab54f5c42e6a053ffe9360d4 100644 (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
index 40cb3a8cf0af3d28620faf6e8a8586b9357d2c94..2544757e76b78b16eae42a17446f5910bf67a404 100755 (executable)
Binary files a/lib/fonts/cmsy10.ttf and b/lib/fonts/cmsy10.ttf differ
index e2539ceb15e429e1ef1d775b184e95228b95c9c1..ef4958f4050e92ae5d369c7f7da7a3267a5a8751 100644 (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
index 07db01fa7e5732407714de9d496202b436ca539b..aba22e34f4454df70fc9d6b789d120417acf25f8 100755 (executable)
Binary files a/lib/fonts/dsrom10.ttf and b/lib/fonts/dsrom10.ttf differ
index 9cc4a6f3dc1b9375244e46d239eb99ca93b63cc8..97f31a804eed9eb1c361d767d254fd1a0ec11d9a 100644 (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' > ) ]
index 8626dec2eaafff786cad270302e282bf57e51b8a..87d6b540474d3e36ffd2435f79c0be7f51d69f42 100755 (executable)
Binary files a/lib/fonts/esint10.ttf and b/lib/fonts/esint10.ttf differ
index c80451aae4bb2edca904a5c4cfb662e5294f60fd..7082f5e8d00742dafb37209ba3a7a52db4a182fa 100644 (file)
@@ -50,6 +50,7 @@ OS2SupXOff: 0
 OS2SupYOff: 1239
 OS2StrikeYSize: 102
 OS2StrikeYPos: 530
+OS2Vendor: 'LyEd'
 OS2UnicodeRanges: 00000000.00000000.00000000.00000000
 MarkAttachClasses: 1
 DEI: 91125
index 0e670d4635a5c491a17b5662901590a85e6a5dbb..da7d5c3b2e72345c197f2ed76f35e1b26a032de3 100755 (executable)
Binary files a/lib/fonts/eufm10.ttf and b/lib/fonts/eufm10.ttf differ
index 20030cdf2932ac9c363f0e3b26be58e09c36d17d..4e21436d0800edbf8cfc53788d0fd93489f489b7 100644 (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
index 3b0cd89d0bfebd33864c70560a2e4e62eedcb124..cb2db1ddc3a136bd460f8705b2116ff54ad67fa8 100755 (executable)
Binary files a/lib/fonts/msam10.ttf and b/lib/fonts/msam10.ttf differ
index de6db2784f90ae1f5c837fb5fc071c5ada2b755d..2453f50cabca931080015ba7a4c7dcd2b1d163df 100644 (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
index 04a4717d64a6f3dd64bd24a3146de54d8e6d8c15..5c92808046defc904b3d0b9bcbca8dbbd2896501 100755 (executable)
Binary files a/lib/fonts/msbm10.ttf and b/lib/fonts/msbm10.ttf differ
index 8206bdfd8795afbee3bdff7fed158a2dcd49f276..b28f6f411d42f4da8d54c45bf3c591edb65c948e 100644 (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' > ) ]
index 4160bcf70430e4e61ea3c1db012f52c4b0233b5d..4559b85ec6dc662f9ad1ddc2ad1623ca8848244c 100755 (executable)
Binary files a/lib/fonts/rsfs10.ttf and b/lib/fonts/rsfs10.ttf differ
index c3e35d894eda612d6d711be7f2c2db9a8e218957..37c423174166a9abe48ea3244e961b4225c42e65 100644 (file)
Binary files a/lib/fonts/stmary10.sfd and b/lib/fonts/stmary10.sfd differ
index a23f0320bd0c92bb82495d61d084af86a5f651ba..328ab6ab5f2d5fc4d519df045bade31f471f96f7 100755 (executable)
Binary files a/lib/fonts/stmary10.ttf and b/lib/fonts/stmary10.ttf differ
index 2276acbc59403b725723cfa200a6ae04ac7f5829..c96fc838c540d1e7ebf153158b1bac644b8cfebf 100644 (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
index d512ed5bacb922c2e1cf1e7cb145b2803a7352a9..7d0ab92fbe22756cd251bc73ae847a129d79fe47 100755 (executable)
Binary files a/lib/fonts/wasy10.ttf and b/lib/fonts/wasy10.ttf differ
index 82dafbffd79ba9507eaab26a8427caac53b9885c..c22c7f1c968c7ce186262cf13d630122955f018a 100644 (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");