Parcourir la source

Set default typeface in web views to TeX Gyre Pagella

Neal Wilson il y a 11 ans
Parent
révision
d4f39e0b1c

+ 4
- 0
src/resources.qrc Voir le fichier

15
         <file>resources/html/about.html</file>
15
         <file>resources/html/about.html</file>
16
         <file>resources/html/style.css</file>
16
         <file>resources/html/style.css</file>
17
         <file>resources/fonts/entypo.ttf</file>
17
         <file>resources/fonts/entypo.ttf</file>
18
+        <file>resources/fonts/texgyrepagella-bold.otf</file>
19
+        <file>resources/fonts/texgyrepagella-bolditalic.otf</file>
20
+        <file>resources/fonts/texgyrepagella-italic.otf</file>
21
+        <file>resources/fonts/texgyrepagella-regular.otf</file>
18
     </qresource>
22
     </qresource>
19
 </RCC>
23
 </RCC>

BIN
src/resources/fonts/texgyrepagella-bold.otf Voir le fichier


BIN
src/resources/fonts/texgyrepagella-bolditalic.otf Voir le fichier


BIN
src/resources/fonts/texgyrepagella-italic.otf Voir le fichier


BIN
src/resources/fonts/texgyrepagella-regular.otf Voir le fichier


+ 12
- 0
src/typica.w Voir le fichier

12441
 @ Similarly some elements make use of a special font which is loaded from
12441
 @ Similarly some elements make use of a special font which is loaded from
12442
 resource data.
12442
 resource data.
12443
 
12443
 
12444
+There has been a report of a bug which I have not been able to reproduce and
12445
+which the original reporter has not yet gotten back to me with the results of
12446
+a test, so I have opted for an alternate approach which does not preclude the
12447
+use of the earlier plan but which may solve the matter. This brings in the
12448
+TeX Gyre Pagella font and sets this as the default standard font for all web
12449
+views.
12450
+
12444
 @<Set up fonts@>=
12451
 @<Set up fonts@>=
12445
 QFile entypo(":/resources/fonts/entypo.ttf");
12452
 QFile entypo(":/resources/fonts/entypo.ttf");
12446
 entypo.open(QIODevice::ReadOnly);
12453
 entypo.open(QIODevice::ReadOnly);
12447
 QFontDatabase::addApplicationFontFromData(entypo.readAll());
12454
 QFontDatabase::addApplicationFontFromData(entypo.readAll());
12448
 entypo.close();
12455
 entypo.close();
12456
+QFontDatabase::addApplicationFont(":/resources/fonts/texgyrepagella-regular.otf");
12457
+QFontDatabase::addApplicationFont(":/resources/fonts/texgyrepagella-bold.otf");
12458
+QFontDatabase::addApplicationFont(":/resources/fonts/texgyrepagella-bolditalic.otf");
12459
+QFontDatabase::addApplicationFont(":/resources/fonts/texgyrepagella-italic.otf");
12460
+QWebSettings::globalSettings()->setFontFamily(QWebSettings::StandardFont, "Tex Gyre Pagella");
12449
 
12461
 
12450
 @ Some widgets provided by \pn{} require access to a database in order to work.
12462
 @ Some widgets provided by \pn{} require access to a database in order to work.
12451
 To simplify using these widgets, the application will request information
12463
 To simplify using these widgets, the application will request information

Chargement…
Annuler
Enregistrer