Closed ronaldtse closed 3 years ago
This is relevant to the ongoing PRs:
Thanks @CAMOBAP !
@Intelligent2013 could you also help verify the font names needed for mn2pdf so @CAMOBAP can help align them here? Thanks!
@ronaldtse to be on the same page where should we list those postscript font names? in fonts_manifest.yaml?
I think Fontist only accepts the family name right now? (Ping @alexeymorozov)
I wonder in the future we could use fontist as a dependency where you can get the appropriate names of fonts in order to pass the names to the output formats.
The font names needed for mn2pdf:
bipm:
csa:
cc:
gb:
iec:
iho:
iso:
itu:
m3d:
mpfd:
nist:
ogc:
rsd:
un:
Note: Source Han Sans font in most cases needs for char replacement when old windows font version is using. For example, in old windows Times New Roman font there aren't some white-spaces glyphs, and if we don't specify 'Source Han Sans' font, then we see '#' char in PDF.
@ronaldtse those fonts above should be added to fonts_manifest.yaml too, right?
@CAMOBAP yes, that's correct.
We have some problems with the fonts here:
iho
, we can't use "SF Mono" because it has a font license that does not allow general usage.@Intelligent2013 anything we can change here?
@Intelligent2013 actually I don't see where IHO uses SF Mono or Helvetica Neue. Let's change to Fira Code and Neue Haas Grotesk instead.
In addition, Azo Sans is available on macOS by default, but not freely licensed. We will have to find an alternative.
@Intelligent2013 actually I don't see where IHO uses SF Mono or Helvetica Neue. Let's change to Fira Code and Neue Haas Grotesk instead.
@ronaldtse ok. FYI, IHO xslt was developed for source doc templates in gh-pages branch (for example, https://raw.githubusercontent.com/metanorma/mn-samples-iho/gh-pages/documents/b12.doc). The main font in docs is "Helvetica Neue":
p.MsoNormal, li.MsoNormal, div.MsoNormal {
mso-style-unhide: no;
mso-style-qformat: yes;
mso-style-parent: "";
margin: 0cm;
margin-bottom: 12.0pt;
mso-pagination: widow-orphan;
font-size: 12.0pt;
font-family: "Helvetica Neue",Arial,sans-serif;
mso-fareast-font-family: "Times New Roman";
mso-ansi-language: EN-US;
mso-fareast-language: EN-US; }
For source code:
p.Sourcecode, li.Sourcecode, div.Sourcecode, pre.Sourcecode, pre {
mso-style-unhide: no;
mso-style-qformat: yes;
mso-style-parent: "";
margin-top: 6.0pt;
margin-right: 0cm;
margin-bottom: 6.0pt;
margin-left: 0cm;
text-align: left;
mso-pagination: widow-orphan;
tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
font-size: 10.0pt;
font-family: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
mso-fareast-font-family: Calibri;
mso-bidi-font-family: "Courier New";
mso-ansi-language: EN-GB; }
In case if font didn't install on system, then MS Word uses next first available font. In this case - Arial:
@CAMOBAP font list above was modified for iho.
@CAMOBAP
Font list for bipm updated - added TeXGyreChorus
font:
bipm:
PRs ready for review
The issue for missing fonts reported https://github.com/fontist/fontist/issues/188
@CAMOBAP so this is now ready to go?
@ronaldtse yep I think os
Done
Each Metanorma flavor + output format has a specific set of fonts to be used.
In HTML/browsers, the fonts specified need to use a browser understandable name for
font-face
andfont-family
.In CSS 4, these two messages indicate: https://github.com/w3c/csswg-drafts/issues/3177#issuecomment-431773808 https://github.com/w3c/csswg-drafts/issues/3177#issuecomment-432131599
That for HTML CSS fonts we should only use "full font name" (i.e. without style) and "postscript name"
And in Chrome: https://stackoverflow.com/questions/24849224/css-font-family-which-name-does-css-font-use
So say for "Overpass" (https://github.com/fontist/formulas/blob/master/Formulas/overpass.yml)
The HTML CSS font name is "Overpass" (family name) or the postscript name "Overpass-BoldItalic"