Jump to content

Talk:Metric-compatible fonts

From ArchWiki
(Redirected from Talk:Croscore Fonts)
Latest comment: 2 November by PiotrGrochowski in topic Accuracy

Accuracy

User:J.mlr correctly points out that some of the fonts here are not metric-identical, and others are just "similar". Metrics are indeed a bit of a headache; there are about two classes of relations we can distinguish on this page:

  • "Works in PDF substitution" is what we are mostly doing here. Because the metrics are not directly used to typeset, a little bit of difference in metrics is okay.
  • "Works in LibreOffice and TeX, does not change layout" is very strict. I've read somewhere that even a tiny change can result in unbounded differences in line / page-break decisions down the line, as typesetting algos tend to not be not very stable with regard to metric diffs, but I can't find the source.
    • The GUST people also described how the OTF format does not allow for full compatibility with the original Computer Modern.
    • The TeX Gyre people have also abandoned the goal of trying to stick with Adobe metrics.
  • There might be some kind of "close enough for not send most documents flying", but I don't know how we can quantify that. Given the same line height, a limited amount of horizontal difference, and a document with not-too-long paragraphs, there has to be some kind of weak consensus as to line and page break decisions.

Arthur2e5 05:47, 10 May 2024 (UTC)Reply

Courier New/Liberation Mono:
width: 1229⁄2048em (0.60009765625em)
above baseline: 1705⁄2048em (0.83251953125em)
below baseline: 615⁄2048em (0.30029296875em)
total height: 2320⁄2048em (1.1328125em)
aspect ratio: 1229∶2320 (∼1:1.88771)
FreeMono:
width: 600⁄1000em (0.6em)
above baseline: 800⁄1000em (0.8em)
below baseline: 200⁄1000em (0.2em)
total height: 1000⁄1000em (1em)
aspect ratio: 3∶5 (∼1:1.66667)
Those fonts are similar in width but very different in height and aspect ratio, so they can't be considered metric compatible with each other. If a document was typeset in Courier New or Liberation Mono, and displayed with FreeMono, then the line height will be shorter than expected, and either the paragraphs will span the wrong height (if the displayed font metrics are used) or the box drawings will be misaligned (if the document metrics are used) or the text will have to be stretched vertically to fit the document's line height. PiotrGrochowski (talk) 11:52, 16 July 2025 (UTC)Reply
This is a case of "works in PDF substitution", because line height does not matter due to forced positioning of characters. To be fair, almost everything works in PDF substition, it's just how ugly it looks. Arthur2e5 04:07, 2 November 2025 (UTC)Reply
As I said, using the document's metrics (like in PDF substitution) would result in misaligned box drawing characters when substituting between Courier New/Liberation Mono and FreeMono, therefore making them not fully compatible. PiotrGrochowski (talk) 06:28, 2 November 2025 (UTC)Reply