From: Enrico Forestieri Date: Thu, 3 Sep 2020 18:42:05 +0000 (+0200) Subject: Personalize fonts X-Git-Tag: 2.3.6~39 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=1f1a8f60070fb6dea9b35c9ec3ef91d6307322f0;p=features.git 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. --- diff --git a/lib/fonts/cmex10.sfd b/lib/fonts/cmex10.sfd index cea4d9d5a6..8431e86d93 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 cf8cd4ce9c..af088f4c6e 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 da3416ae5f..463e38aa9a 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 9b2b430e5d..e7a7ac9ffb 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 80f8e565fb..641fe4dd2b 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 e405536e6d..efff9fcf59 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 ad7e4839be..5ae7f207ec 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 40cb3a8cf0..de7089790d 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 9ab5bc2622..bf7e98b115 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 07db01fa7e..ae17983e22 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 eb0b568859..71a4fe1c51 100644 --- a/lib/fonts/esint10.sfd +++ b/lib/fonts/esint10.sfd @@ -50,7 +50,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 deb6e5fe97..60535fd66c 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 c80451aae4..7082f5e8d0 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 0e670d4635..da7d5c3b2e 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 20030cdf29..4e21436d08 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 3b0cd89d0b..3eaad5ae31 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 de6db2784f..2453f50cab 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 04a4717d64..dd7c2943e9 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 8206bdfd87..b28f6f411d 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 4160bcf704..4b17608215 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 f1841d9a06..56637c844a 100644 --- a/lib/fonts/stmary10.sfd +++ b/lib/fonts/stmary10.sfd @@ -1,4 +1,4 @@ -SplineFontDB: 3.0 +SplineFontDB: 3.2 FontName: stmary10 FullName: stmary10 FamilyName: stmary10 @@ -6,23 +6,30 @@ Weight: Roman Copyright: Copyright (c) Taco Hoekwater, 1998. All rights reserved. Version: 001.001 ItalicAngle: 0 -UnderlinePosition: -102.4 -UnderlineWidth: 51.2 +UnderlinePosition: -102 +UnderlineWidth: 51 Ascent: 819 Descent: 205 +InvalidEm: 0 LayerCount: 2 -Layer: 0 0 "Back" 1 -Layer: 1 0 "Zeichenebene" 0 +Layer: 0 0 "Back" 1 +Layer: 1 0 "Zeichenebene" 0 +FSType: 0 OS2Version: 0 OS2_WeightWidthSlopeOnly: 0 OS2_UseTypoMetrics: 0 CreationTime: 1302307949 -ModificationTime: 1421634721 +ModificationTime: 1599145907 +PfmFamily: 17 +TTFWeight: 400 +TTFWidth: 5 +LineGap: 92 +VLineGap: 0 OS2TypoAscent: 0 OS2TypoAOffset: 1 OS2TypoDescent: 0 OS2TypoDOffset: 1 -OS2TypoLinegap: 0 +OS2TypoLinegap: 92 OS2WinAscent: 0 OS2WinAOffset: 1 OS2WinDescent: 0 @@ -31,17 +38,17 @@ HheadAscent: 0 HheadAOffset: 1 HheadDescent: 0 HheadDOffset: 1 -OS2Vendor: 'PfEd' +OS2Vendor: 'LyEd' MarkAttachClasses: 1 DEI: 91125 -LangName: 1033 "" "" "LyX" "FontForge 2.0 : stmary10 : 17-7-2010" +LangName: 1033 "" "" "LyX" "FontForge 2.0 : stmary10 : 17-7-2010" Encoding: UnicodeBmp UnicodeInterp: none NameList: Adobe Glyph List DisplaySize: -96 AntiAlias: 1 FitToEm: 1 -WinInfo: 0 8 2 +WinInfo: 64 8 2 BeginPrivate: 0 EndPrivate BeginChars: 65539 131 diff --git a/lib/fonts/stmary10.ttf b/lib/fonts/stmary10.ttf index bafedc43b1..a380b37e34 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 f70df41efa..10468b5b00 100644 --- a/lib/fonts/wasy10.sfd +++ b/lib/fonts/wasy10.sfd @@ -50,7 +50,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 a4e32d20ea..feebb218f8 100755 Binary files a/lib/fonts/wasy10.ttf and b/lib/fonts/wasy10.ttf differ diff --git a/src/frontends/qt4/GuiFontLoader.cpp b/src/frontends/qt4/GuiFontLoader.cpp index bfc215d376..24e5e9b7b6 100644 --- a/src/frontends/qt4/GuiFontLoader.cpp +++ b/src/frontends/qt4/GuiFontLoader.cpp @@ -189,7 +189,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"); diff --git a/status.23x b/status.23x index 552ccd7968..cf4d1b2d7b 100644 --- a/status.23x +++ b/status.23x @@ -32,6 +32,8 @@ What's new - Allow creation of a child file from the include dialog (bug 4475). +- Make sure to load the correct math fonts in certain cases. + * MISCELLANEOUS