what defines the font size?
![](https://secure.gravatar.com/avatar/5955e8e90611e77ccbfc7721b6112027.jpg?s=120&d=mm&r=g)
Dear list, sorry for this basic question, but what defines the size in a font? I mean, we can take TeX Gyre Bonum and TeX Gyre Adventor at twelve points. x-height is different, M-width is slightly different. I thought it was the same A-height, but it isn’t. If two fonts have the same size, I think there may be a dimension which has the same length in both. Which one is this? Sorry for the basic question and many thanks for your help, Pablo -- http://www.ousia.tk
![](https://secure.gravatar.com/avatar/d4bd34a45c928e8356f38323ff84763e.jpg?s=120&d=mm&r=g)
Am Mon, 15 Oct 2018 21:21:32 +0200 schrieb Pablo Rodriguez:
Dear list,
sorry for this basic question, but what defines the size in a font?
I mean, we can take TeX Gyre Bonum and TeX Gyre Adventor at twelve points. x-height is different, M-width is slightly different.
I thought it was the same A-height, but it isn’t.
If two fonts have the same size, I think there may be a dimension which has the same length in both. Which one is this?
None. The font decides about its size. -- Ulrike Fischer https://www.troubleshooting-tex.de/
![](https://secure.gravatar.com/avatar/46562c7d27388490d62e8d7a5bc960dd.jpg?s=120&d=mm&r=g)
On 10/15/2018 10:02 PM, Ulrike Fischer wrote:
Am Mon, 15 Oct 2018 21:21:32 +0200 schrieb Pablo Rodriguez:
Dear list,
sorry for this basic question, but what defines the size in a font?
I mean, we can take TeX Gyre Bonum and TeX Gyre Adventor at twelve points. x-height is different, M-width is slightly different.
I thought it was the same A-height, but it isn’t.
If two fonts have the same size, I think there may be a dimension which has the same length in both. Which one is this?
None. The font decides about its size. actually, the designer ... anyway, one can compare 10pt dejavu with 10pt latin modern and 10pt lucida and you'll see that there is no real standard in size
(and when one sees documents made by tex on the web it looks like not all users care about mixing funny sizes, but then, most webpages don't do it so they might consider it normal) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/a0f6b595b0e3b7f3abba19eeb8261fc2.jpg?s=120&d=mm&r=g)
On Mon, Oct 15, 2018 at 10:59:57PM +0200, Hans Hagen wrote:
On 10/15/2018 10:02 PM, Ulrike Fischer wrote:
None. The font decides about its size. actually, the designer ...
I quite liked the idea of the font itself deciding on its size, of its own free will ;-) To stress the point, there is nothing that can intrinsically define the size of a font in the computer age. It’s partly arbitrary. It’s the same for clothes, actually. In the UK, my shirt size is a 15½ and my hat size is 7⅝. Go figure. Best, Arthur
![](https://secure.gravatar.com/avatar/46562c7d27388490d62e8d7a5bc960dd.jpg?s=120&d=mm&r=g)
On 10/16/2018 9:07 AM, Arthur Reutenauer wrote:
On Mon, Oct 15, 2018 at 10:59:57PM +0200, Hans Hagen wrote:
On 10/15/2018 10:02 PM, Ulrike Fischer wrote:
None. The font decides about its size. actually, the designer ...
I quite liked the idea of the font itself deciding on its size, of its own free will ;-)
To stress the point, there is nothing that can intrinsically define the size of a font in the computer age. It’s partly arbitrary. It’s the same for clothes, actually. In the UK, my shirt size is a 15½ and my hat size is 7⅝. Go figure. so given that when picking up a conference t-shirts at bachotex you have to get one size smaller than you expect, one can also assume that the gyre collection designsize is somewhat oversized
Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/d4bd34a45c928e8356f38323ff84763e.jpg?s=120&d=mm&r=g)
Am Tue, 16 Oct 2018 09:07:38 +0200 schrieb Arthur Reutenauer:
I quite liked the idea of the font itself deciding on its size, of its own free will ;-)
;-) That's an application of Gödel's incompleteness theorems: with some level of complexity and lookups strange loops und true but unproveable statements about the font appear and then it clearly has its how free will. Or shorter: you no longer can really understand what it is doing ... -- Ulrike Fischer http://www.troubleshooting-tex.de/
![](https://secure.gravatar.com/avatar/5955e8e90611e77ccbfc7721b6112027.jpg?s=120&d=mm&r=g)
On 10/15/18 10:59 PM, Hans Hagen wrote:
[...] If two fonts have the same size, I think there may be a dimension which has the same length in both. Which one is this?
None. The font decides about its size. actually, the designer ... anyway, one can compare 10pt dejavu with 10pt latin modern and 10pt lucida and you'll see that there is no real standard in size
Many thanks for your reply, Hans. I thought that I was missing something. For sure, but it was the explanation why there is no standarization in size. Many thanks for your help, Pablo -- http://www.ousia.tk
![](https://secure.gravatar.com/avatar/e5aa6984b53b8925e405ebbdbc051ad9.jpg?s=120&d=mm&r=g)
Am 2018-10-16 um 19:50 schrieb Pablo Rodriguez
On 10/15/18 10:59 PM, Hans Hagen wrote:
[...] If two fonts have the same size, I think there may be a dimension which has the same length in both. Which one is this?
None. The font decides about its size. actually, the designer ... anyway, one can compare 10pt dejavu with 10pt latin modern and 10pt lucida and you'll see that there is no real standard in size
Many thanks for your reply, Hans.
I thought that I was missing something. For sure, but it was the explanation why there is no standarization in size.
Even in the times of lead type, there were differences in font size interpretation e.g. between Linotype and Berthold. You could trust that the big vendors would handle their fonts alike, but printshops tried to avoid buying fonts from different vendors because they didn’t match. Greetlings, Hraban --- https://www.fiee.net http://wiki.contextgarden.net https://www.dreiviertelhaus.de GPG Key ID 1C9B22FD
![](https://secure.gravatar.com/avatar/386a116d129cdc597f2bb6210bbaff7a.jpg?s=120&d=mm&r=g)
On Tue, Oct 16, 2018 at 7:51 PM Pablo Rodriguez
On 10/15/18 10:59 PM, Hans Hagen wrote:
[...] If two fonts have the same size, I think there may be a dimension which has the same length in both. Which one is this?
None. The font decides about its size. actually, the designer ... anyway, one can compare 10pt dejavu with 10pt latin modern and 10pt lucida and you'll see that there is no real standard in size
Many thanks for your reply, Hans.
I thought that I was missing something. For sure, but it was the explanation why there is no standarization in size.
Nice to/must have : Fonts & Encodings Book by Yannis Haralambous https://docs.microsoft.com/en-us/typography/ and pdf at https://docs.microsoft.com/en-us/typography/opbuildpdf/TOC.pdf?branch=live -- luigi
![](https://secure.gravatar.com/avatar/5955e8e90611e77ccbfc7721b6112027.jpg?s=120&d=mm&r=g)
On 10/17/18 11:13 AM, luigi scarso wrote:
[...] Nice to/must have :
Fonts & Encodings Book by Yannis Haralambous
https://docs.microsoft.com/en-us/typography/ and pdf at https://docs.microsoft.com/en-us/typography/opbuildpdf/TOC.pdf?branch=live
Many thanks for the references, Luigi. Pablo -- http://www.ousia.tk
![](https://secure.gravatar.com/avatar/386a116d129cdc597f2bb6210bbaff7a.jpg?s=120&d=mm&r=g)
On Wed, Oct 17, 2018 at 6:15 PM Pablo Rodriguez
On 10/17/18 11:13 AM, luigi scarso wrote:
[...] Nice to/must have :
Fonts & Encodings Book by Yannis Haralambous
https://docs.microsoft.com/en-us/typography/ and pdf at
https://docs.microsoft.com/en-us/typography/opbuildpdf/TOC.pdf?branch=live
also this --- but keep the https://docs.microsoft.com/en-us/typography/ as reference : http://designwithfontforge.com/en-US/The_EM_Square.html -- luigi
![](https://secure.gravatar.com/avatar/5955e8e90611e77ccbfc7721b6112027.jpg?s=120&d=mm&r=g)
On 10/15/18 10:02 PM, Ulrike Fischer wrote:
Am Mon, 15 Oct 2018 21:21:32 +0200 schrieb Pablo Rodriguez:
[...] If two fonts have the same size, I think there may be a dimension which has the same length in both. Which one is this?
None. The font decides about its size.
Many thanks for your clear statement, Ulrike. Thomas Pinney explains why this might happen: http://www.thomasphinney.com/2011/03/point-size/. I cannot claim that I understand his explanation, but it seems that there is something about the em quad, which might be something like: \setupframed [offset=none, framecolor=red, rulethickness=0.01pt, width=12pt, height=12pt] \starttext \startTEXpage[offset=1em] \framed{M} \framed{\tfxx M} \framed{\tfd M} \stopTEXpage \stoptext The square gives the points of the font (its size), but the glyphs might be drawn in many different ways (I guess). The issue with units per em is something I didn’t understand. I tried to experiment (modifying TeX Gyre Pagella from 1000 to 9999 UPM), but for some reason, I wasn’t able to load the font. Just in case anyone wonders, my code was standard: \definefontfamily [mainface] [rm] [TeX Gyre Pagella] [bf=file:texgyrepagella-modified.otf] \setupbodyfont[mainface] And the file was on the same directory as my ConTeXt source file. Many thanks for your help, Pablo -- http://www.ousia.tk
![](https://secure.gravatar.com/avatar/46562c7d27388490d62e8d7a5bc960dd.jpg?s=120&d=mm&r=g)
On 10/16/2018 7:48 PM, Pablo Rodriguez wrote:
I tried to experiment (modifying TeX Gyre Pagella from 1000 to 9999 UPM), but for some reason, I wasn’t able to load the font. Messing with such value is asking for problems and you can be sure that I won't waste time on looking issues resulting from it.
Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/5955e8e90611e77ccbfc7721b6112027.jpg?s=120&d=mm&r=g)
On 10/17/18 12:59 AM, Hans Hagen wrote:
On 10/16/2018 7:48 PM, Pablo Rodriguez wrote:
I tried to experiment (modifying TeX Gyre Pagella from 1000 to 9999 UPM), but for some reason, I wasn’t able to load the font. Messing with such value is asking for problems and you can be sure that I won't waste time on looking issues resulting from it.
I didn’t intend that. I only included two commands (not a complete sample), because I thought I might be not invoking them right. Pablo -- http://www.ousia.tk
![](https://secure.gravatar.com/avatar/a0f6b595b0e3b7f3abba19eeb8261fc2.jpg?s=120&d=mm&r=g)
On Tue, Oct 16, 2018 at 07:48:41PM +0200, Pablo Rodriguez wrote:
I cannot claim that I understand his explanation, but it seems that there is something about the em quad
The em quad has the same width as the font size, that’s correct. But it still doesn’t mean that any part of any glyph in the font has that length. It’s really a tautology, actually: if you take a font at size, say, 12pt, then the em space is 12pt wide. That’s the definition (at least in the TeX world). It’s less clear what you’re trying to do next:
\setupframed [offset=none, framecolor=red, rulethickness=0.01pt, width=12pt, height=12pt]
\starttext \startTEXpage[offset=1em] \framed{M} \framed{\tfxx M} \framed{\tfd M} \stopTEXpage \stoptext
What are you trying to demonstrate with this? If you change the size of the font, obviously the glyphs have different sizes. The initial size at \starttext is 12pt, then \tfxx and \tfd change the sizes, to 8pt and 20.736pt respectively. Hence the former looks quite small in the box, and the latter looks very large. All that’s perfectly normal, and since you’re not changing the font, or even the glyph, it’s not a good illustration of the points raised in your initial email.
The issue with units per em is something I didn’t understand.
That’s irrelevant for you as a font user. Don’t worry about it. Best, Arthur
![](https://secure.gravatar.com/avatar/5955e8e90611e77ccbfc7721b6112027.jpg?s=120&d=mm&r=g)
On 10/17/18 11:02 AM, Arthur Reutenauer wrote:
On Tue, Oct 16, 2018 at 07:48:41PM +0200, Pablo Rodriguez wrote: [...] It’s less clear what you’re trying to do next:
[...] What are you trying to demonstrate with this? If you change the size of the font, obviously the glyphs have different sizes. The initial size at \starttext is 12pt, then \tfxx and \tfd change the sizes, to 8pt and 20.736pt respectively. Hence the former looks quite small in the box, and the latter looks very large. All that’s perfectly normal, and since you’re not changing the font, or even the glyph, it’s not a good illustration of the points raised in your initial email.
I tried to show that the em square is the fixed measure. But the glyphs may relate in different ways to that square. I know that \tfxx and \tfd are different sizes. But there would be nothing against taking each of them to develop a new font (at 12 points) with their diverse glyph sizes. Or am I missing something.
The issue with units per em is something I didn’t understand.
That’s irrelevant for you as a font user. Don’t worry about it.
A user that asks why different fonts have glyphs with different sizes given the same point for both, doesn’t remain a font user anymore. (I only wanted to understand, in order to be able to illustrate other people.) Pablo -- http://www.ousia.tk
![](https://secure.gravatar.com/avatar/46562c7d27388490d62e8d7a5bc960dd.jpg?s=120&d=mm&r=g)
On 10/17/2018 6:14 PM, Pablo Rodriguez wrote:
On 10/17/18 11:02 AM, Arthur Reutenauer wrote:
On Tue, Oct 16, 2018 at 07:48:41PM +0200, Pablo Rodriguez wrote: [...] It’s less clear what you’re trying to do next:
[...] What are you trying to demonstrate with this? If you change the size of the font, obviously the glyphs have different sizes. The initial size at \starttext is 12pt, then \tfxx and \tfd change the sizes, to 8pt and 20.736pt respectively. Hence the former looks quite small in the box, and the latter looks very large. All that’s perfectly normal, and since you’re not changing the font, or even the glyph, it’s not a good illustration of the points raised in your initial email.
I tried to show that the em square is the fixed measure. But the glyphs may relate in different ways to that square.
I know that \tfxx and \tfd are different sizes. But there would be nothing against taking each of them to develop a new font (at 12 points) with their diverse glyph sizes.
Or am I missing something.
I don't understand what you issue is. Each font (size) has its own emwidth. Why design a \tfxx ? Of course, there are fonts with multiple designsizes but if that is the case then shapes differ (just compare 5pt 7pt 10pt latin modern) but 'develop a new font' is often quite some effort (esp now that we have unicode fonts).
The issue with units per em is something I didn’t understand.
That’s irrelevant for you as a font user. Don’t worry about it.
A user that asks why different fonts have glyphs with different sizes given the same point for both, doesn’t remain a font user anymore.
Just explain that it's design side. And compare it to sizing dogs or so ... what do you measure? Its tail or its legs.
(I only wanted to understand, in order to be able to illustrate other people.) Hans
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/a0f6b595b0e3b7f3abba19eeb8261fc2.jpg?s=120&d=mm&r=g)
On Wed, Oct 17, 2018 at 06:14:21PM +0200, Pablo Rodriguez wrote:
I tried to show that the em square is the fixed measure.
It’s not. You misunderstand. You sent an example \startTEXpage[offset=1em] \framed{M} \framed{\tfxx M} \framed{\tfd M} \stoptext where all the frames had the same size, but that’s only because you hardcoded it earlier in the file: \setupframed [offset=none, framecolor=red, rulethickness=0.01pt, width=12pt, height=12pt] Notice how the width and height are both set to 12pt? Obviously the frames are going to have fixed sizes then. If you remove that artificial setting, the frames are allowed to grow and shrink as expected.
Or am I missing something.
Quite a bit, I’m afraid. Later in this thread you’ll see that Hans is talking about design size, which is a related, yet different issue. Do you understand what he’s talking about?
The issue with units per em is something I didn’t understand.
That’s irrelevant for you as a font user. Don’t worry about it.
A user that asks why different fonts have glyphs with different sizes given the same point for both, doesn’t remain a font user anymore.
I have to insist: units per em are not something you should worry at all unless you’re designing the font yourself. Best, Arthur
![](https://secure.gravatar.com/avatar/46562c7d27388490d62e8d7a5bc960dd.jpg?s=120&d=mm&r=g)
On 10/18/2018 9:54 AM, Arthur Reutenauer wrote:
On Wed, Oct 17, 2018 at 06:14:21PM +0200, Pablo Rodriguez wrote:
I tried to show that the em square is the fixed measure.
It’s not. You misunderstand. You sent an example
\startTEXpage[offset=1em] \framed{M} \framed{\tfxx M} \framed{\tfd M} \stoptext
where all the frames had the same size, but that’s only because you hardcoded it earlier in the file:
\setupframed [offset=none, framecolor=red, rulethickness=0.01pt, width=12pt, height=12pt]
Notice how the width and height are both set to 12pt? Obviously the frames are going to have fixed sizes then. If you remove that artificial setting, the frames are allowed to grow and shrink as expected.
Or am I missing something.
Quite a bit, I’m afraid. Later in this thread you’ll see that Hans is talking about design size, which is a related, yet different issue. Do you understand what he’s talking about?
\definefontfeature[default][default][boundingbox=yes] \setupbodyfont[dejavu] \starttext \input tufte \stoptext
The issue with units per em is something I didn’t understand.
That’s irrelevant for you as a font user. Don’t worry about it.
A user that asks why different fonts have glyphs with different sizes given the same point for both, doesn’t remain a font user anymore.
I have to insist: units per em are not something you should worry at all unless you’re designing the font yourself.
Best,
Arthur ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________
-- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/386a116d129cdc597f2bb6210bbaff7a.jpg?s=120&d=mm&r=g)
On Tue, Oct 16, 2018 at 7:48 PM Pablo Rodriguez
I tried to experiment (modifying TeX Gyre Pagella from 1000 to 9999 UPM), but for some reason, I wasn’t able to load the font.
hm. Weird. Assuming ttx from fontools $> ttx texgyrepagella-regular.otf $> cp texgyrepagella-regular.ttx texgyrepagella-regular-500.ttx $> cp texgyrepagella-regular.ttx texgyrepagella-regular-2000.ttx Then we can edit the unitsPerEm tag: texgyrepagella-regular-2000.ttx: <unitsPerEm value="2000"/> texgyrepagella-regular-500.ttx: <unitsPerEm value="500"/> Also, better to edit the names too: texgyrepagella-regular-2000.ttx: <CFFFont name="TeXGyrePagella-Regular2000"> texgyrepagella-regular-2000.ttx: <FullName value="TeXGyrePagella-Regular2000"/> texgyrepagella-regular-2000.ttx: <FamilyName value="TeXGyrePagella"/> texgyrepagella-regular-500.ttx: <CFFFont name="TeXGyrePagella-Regular500"> texgyrepagella-regular-500.ttx: <FullName value="TeXGyrePagella-Regular500"/> texgyrepagella-regular-500.ttx: <FamilyName value="TeXGyrePagella"/> texgyrepagella-regular.ttx: <CFFFont name="TeXGyrePagella-Regular"> texgyrepagella-regular.ttx: <FullName value="TeXGyrePagella-Regular"/> texgyrepagella-regular.ttx: <FamilyName value="TeXGyrePagella"/> Then recompile the font $>ttx texgyrepagella-regular-500.ttx $>ttx texgyrepagella-regular-2000.ttx and the following examples with context: %%% test-500-1000-2000.tex \nopdfcompression \usemodule[fnt-10] \starttext {\tfd file:texgyrepagella-regular-500.otf} \ShowCompleteFont{file:texgyrepagella-regular-500.otf}{10pt}{1} {\tfd file:texgyrepagella-regular.otf} \ShowCompleteFont{file:texgyrepagella-regular.otf}{10pt}{1} {\tfd file:texgyrepagella-regular-2000.otf} \ShowCompleteFont{file:texgyrepagella-regular-2000.otf}{10pt}{1} \stoptext %%% test-hello-500-1000-2000.tex \nopdfcompression \definefont[TestD][file:texgyrepagella-regular-500.otf at 10bp] \definefont[Test][file:texgyrepagella-regular.otf at 10bp] \definefont[TestMM][file:texgyrepagella-regular-2000.otf at 10bp] \starttext \startTEXpage {\TestD Hello 500} {\Test Hello 1000} {\TestMM Hello 2000} \stopTEXpage \stoptext (yes, we have "10pt" vs "10bp") You should see that the texgyrepagella-regular-500.otf is bigger than texgyrepagella-regular.otf and the texgyrepagella-regular-2000.otf is smaller than texgyrepagella-regular.otf This is ok: texgyrepagella-regular has unitsPerEm value="1000" so changing *only* the unitsPerEm has an effect of scaling. Consider the "M" : $ grep 'name="M"' *ttx|grep mtx texgyrepagella-regular-2000.ttx: <mtx name="M" width="946" lsb="16"/> texgyrepagella-regular-500.ttx: <mtx name="M" width="946" lsb="16"/> texgyrepagella-regular.ttx: <mtx name="M" width="946" lsb="16"/> where "width" is the "advance width" in "font design units" (it is the """ distance the current text position shall move (by translating text space) when the glyph is painted. """ , see the pdf reference). So in texgyrepagella-regular.ttx, M has a "width" of 946 on 1000 units, in texgyrepagella-regular-500.ttx, M has a "width" of 946 on 500 that looks like 2x the width of M in regular in texgyrepagella-regular-2000.ttx, M has a "width" of 946 on 2000 that looks like 0.5x the width of M in regular --- under the assumption that we have changes *only* the value of unitsPerEm. unitsPerEm is a number that says that, well, "1em is made by <unitsPerEm> values": it is a dimensionless unit that defines a "glyph space of (x,y) real coordinates " ( not arbitrarily, there are implementation limits to respect ). So, in principle we can say "Let's start to design a font in a grid 1000x1000 of font design units" as well "Let's start to design a font in a grid of 2048x2048 units". In any case, at some point we have to translate these numbers from the dimensionless "glyph space" to a dimensional "text space" and this is done by the FontMatrix --- another set of numbers that we can choose arbitrarily, at least apparently. Given an unitsPerEm=1000, if we choose a FontMatrix = [ 0.001 0 0 0.001 0 0 ] then, for both horizontal and vertical dimensions, 1000 units in a "glyph space" are 1000*0.001 = 1 Postscript point in the "text space": i.e 1000 units => 1 Postscript point = 1/72 inch ~ 0.0003528 m (1 Postscript point is 1bp in TeX and it's not exactly the same of 1pt). When an application loads a font to typeset some text it has to specify the size of the glyph in a dimensional unit , because in the end everything must be rasterized on a physical device -- screen or paper -- to be viewed . In TeX, by saying "at 10pt" we mean "for this font, multiply every dimension in "text space" by 9.9626401" (10pt are 9.9626401bp , ie 9.9626401 Postscript points). The font designer should then explicitly says (in some doc) something like "this font is for reading at 10pt" or "this is for title at 18pt" or something similar (of course he means Postscript points, not TeX points) and from here we can have an idea of "design size" of the font. So, if we have 1000 unitsPerEm, a FontMatrix = [ 0.001 0 0 0.001 0 0 ], and we choose 10bp for the actual text, 1000 units are 10bp, or 1em = 10bp In the previous experiments we have left unchanged the FontMatrix: texgyrepagella-regular-2000.ttx: <FontMatrix value="0.001 0 0 0.001 0 0"/> texgyrepagella-regular-500.ttx: <FontMatrix value="0.001 0 0 0.001 0 0"/> texgyrepagella-regular.ttx: <FontMatrix value="0.001 0 0 0.001 0 0"/> as well as all the other dimensions. In texgyrepagella-regular-500.ttx we have 500 unitsPerEm and hence 500 units in a "glyph space" that should be 500*0.001 = 0.5 Postscript points in the "text space". But if we read the pdf specification , we see this: """ The glyph coordinate system is the space in which an individual character’s glyph is defined. All path coordinates and metrics shall be interpreted in glyph space. For all font types except Type 3, the units of glyph space are one-thousandth of a unit of text space; for a Type 3 font, the transformation from glyph space to text space shall be defined by a font matrix specified in an explicit FontMatrix entry in the font. """ As result, the combination of unitsPerEm and FontMatrix must give the same result of the "canonical values " unitsPerEm=1000 and FontMatrix [ 0.001 0 0 0.001 0 0 ] = [1/1000 0 0 1/1000 0 0]: this means that unitsPerEm=500 should have a correct FontMatrix = [1/500 0 0 1/500 0 0] = [2/1000 0 0 2/1000 0 0]. This explains why in texgyrepagella-regular-500 the glyphs are 2 times bigger: its FontMatrix [ 0.001 0 0 0.001 0 0 ] = [1/1000 0 0 1/1000 0 0] needs a factor 2 to give one-thousandth of a unit of text space. The same -- mutatis mutandis -- for texgyrepagella-regular-2000: unitsPerEm=2000 means a correct FontMatrix = [1/2000 0 0 1/2000 0 0] = [0.5/1000 0 0 0.5/1000 0 0]: but in our case the FontMatrix is again [ 0.001 0 0 0.001 0 0 ], so the factor is 1/2 . We can see these values into test-hello-500-1000-2000.pdf << /Length 350 >> stream 0 g 0 G 0 g 0 G BT /F8 19.999982 Tf 1 0 0 1 0 28.93918 Tm [<003F>832<0033>479<0049>291<0049>291<0052>296<0039>500<007A>501<007A>]TJ /F9 9.999991 Tf 1 0 0 1 0 14.5196 Tm [<003F0033004900490052>-250<0053007A007A007A>]TJ /F10 4.999995 Tf 1 0 0 1 0 0.10003 Tm [<003F>-416<0033>-239<0049>-146<0049>-145<0052>-523<006C>-251<007A>-250<007A>-250<007A>]TJ ET endstream endobj 7 0 obj << /Font << /F8 10 0 R /F9 11 0 R /F10 12 0 R >> /ProcSet [ /PDF /Text ] >> 10 0 obj << /Type /Font /Subtype /Type0 /Encoding /Identity-H /BaseFont /JDCZQP+TeXGyrePagella-Regular500 /DescendantFonts [ 29 0 R ] /ToUnicode 28 0 R >> 11 0 obj << /Type /Font /Subtype /Type0 /Encoding /Identity-H /BaseFont /EDXNJZ+TeXGyrePagella-Regular /DescendantFonts [ 24 0 R ] /ToUnicode 23 0 R >> 12 0 obj << /Type /Font /Subtype /Type0 /Encoding /Identity-H /BaseFont /BNOEVZ+TeXGyrePagella-Regular2000 /DescendantFonts [ 19 0 R ] /ToUnicode 18 0 R >> /F9 is TeXGyrePagella-Regular, and has a Tf of 9.999991 ~ 10 ( it should be 10, but the TeX point and the scaled math have their effects) /F8 is ~ 20, and /F10 ~ 5. In test-500-1000-2000.pdf there are a bit different values, because we are using 10pt. unitsPerEm different from 1000 exist: for example, if we look at the Fell types (see http://iginomarini.com/fell/the-revival-fonts) the IMFeENrm29C.otf has $ grep unitsPerEm IMFeENrm29C.ttx <unitsPerEm value="2048"/> $ calc -p "1/2048" 0.00048828125 and the FontMatrix correctly says $ grep FontMatrix IMFeENrm29C.ttx <FontMatrix value="0.000488281 0 0 0.000488281 0 0"/> (a luatex plain example is %% test-fell.tex \pdfvariable compresslevel0 \pdfvariable objcompresslevel0 \font\TestIMFe=file:IMFeENrm29C.otf at 10bp {\TestIMFe Hello IMFeENrm29C} \bye $> mtxrun--script plain test-fell.tex ) This relation between unitsPerEm and FontMatrix is enforced in CFF2 (the new "font variations" , https://docs.microsoft.com/en-us/typography/opentype/spec/cff2): """ The Top DICT FontMatrix operator is required if the unitsPerEm value in the 'head' table is other than 1000. If unitsPerEm is 1000, then the FontMatrix operator may be omitted. When included, the FontMatrix operand array must be 1/unitsPerEm 0 0 1/unitsPerEm 0 0. The default values shown above assume that unitsPerEm is 1000. """ where "default values shown above" are 0.001 0 0 0.001 0 0 . There are some limits: 1) unitsPerEm: Valid range is from 16 to 16384. This value should be a power of 2 for fonts that have TrueType outlines. 2) the CFF has a type2 charstring, where the real values are signed Q16.16 (signed 16bit integer with 16bit fraction, range [-2^15,2^15-2^-1], resolution 2^-16, encoded in 5 bytes) and also integer signed 16bit integer, encoded in 3 bytes. This unusual encoding is for backward compatibility with the type1 charstring, where a 32-bit signed integer is encoded in 5 bytes, given a range [-2^31,2^31-1] --- but a note says that " Numbers with absolute values greater than 32,000 must be followed by a div operator such that the result of the div is less than 32,000." It's hence possible to compare (CFF) fonts, but we have to consider the unitsPerEm and the FontMatrix: as we have seen for the width of "M", same glyphs-space values can get different text-space values. In conclusion: better to avoid to manipulate unitsPErEm and FontMatrix and keep them to the reference values of 1000 and [ 0.001 0 0 0.001 0 0 ] . To see another effect of the FontMatrix, you can make a texgyrepagella-regular-skew45.ttx with only <FontMatrix value="0.001 0.001 0 0.001 0 0"/> (also modify the names in "TeXGyrePagella-Regularskew45" as done before) Now the unitsPerEm=1000 and the FontMatrix are ok for the xscale (first 0.001) and yscale (fourth 0.001), but the second 0.001 is a skew of 45° wrt to the x axis (and, as seen before, it's better to avoid such things in a CFF2 font). -- luigi
![](https://secure.gravatar.com/avatar/a0f6b595b0e3b7f3abba19eeb8261fc2.jpg?s=120&d=mm&r=g)
Luigi, Many thanks for this information-packed summary, it’s very uselful and I even learned a thing or two :-) Best, Arthur
![](https://secure.gravatar.com/avatar/5955e8e90611e77ccbfc7721b6112027.jpg?s=120&d=mm&r=g)
On 10/19/18 8:24 AM, luigi scarso wrote:
On Tue, Oct 16, 2018 at 7:48 PM Pablo Rodriguez wrote:
I tried to experiment (modifying TeX Gyre Pagella from 1000 to 9999 UPM), but for some reason, I wasn’t able to load the font.
hm. Weird.
Many thanks for your in-depth explaination, Luigi. I will have to devote some weeks to study it. Your samples work fine, but I cannot load the fonts in a different source. I’m going to start a new thread to check what I’m missing. Many thanks for your help again, Pablo -- http://www.ousia.tk
![](https://secure.gravatar.com/avatar/565476157eb3895a9c928ffce26d988d.jpg?s=120&d=mm&r=g)
Hi Pablo, Let me go back an try to answer the original question:
On 15 Oct 2018, at 21:21, Pablo Rodriguez
wrote: Dear list,
sorry for this basic question, but what defines the size in a font?
The font designer decides on the ‘natural’ size of the font. There are two parts to this. First, what the ‘natural’ size indicates is the designer’s _intended use size_ for the font, such that when you plan to use the font “Times-Roman” without any special rescaling, it should in fact be equivalent to “Times-Roman at ’natural size’”. For most fonts, this ‘natural size’ is 10pt, but special display or footnote fonts may have a different intended use size, and the font designer may have made special glyph adjustments for that purpose. For example, the computer modern family has special fonts with a ‘natural’ size anywhere between 5pt and 17pt. The glyphs in the specific fonts with a smaller ‘natural’ size (like 8pt) are in fact a little bit bolder and wider than the same glyphs in the font designed to be used at 10pt. This makes sense when you consider that the 8pt font is likely be used along with the 10pt font for e.g. footnotes. The 10pt font used at 8pt size would look thinner and weaker than the actual font designed for 8pt. Second, a design size in points like ‘10pt’ is somewhat misleading, because what it actually is, is just a different way of saying “at the expected size for traditional main text”. The “10pt" is not necessarily a measure of _anything_ in the font. In fact, font designers sometimes do not use a “XXpt” design size at all.The Minion font family has fonts with names like "Minion Pro Caption" and "Minion Pro Display”, which is actually a better indication of the information the font designer wants to convey. That leaves the question of what the actual size is of a font used at “10pt”. As explained above, there are no hard rules. But usually for a modern font the “10pt" is the _vertical_ space needed to enclose all of the ascenders and descenders in the font when all the glyphs are overlaid on top of each other. Traditionally, this was also the with of an ‘em’, going back to the Roman era, where inscribed text fitted characters into a square. But these days that is no longer always the case, since some font families have condensed or extended members (and it really only applied to ‘upright’ fonts anyways). In short:
If two fonts have the same size, I think there may be a dimension which has the same length in both. Which one is this?
No, there is no such thing. "TeX Gyre Bonum and TeX Gyre Adventor at twelve point” really only means this: "TeX Gyre Bonum at a somewhat larger size than the TeX Gyre Bonum designer intended and TeX Gyre Adventor at a somewhat larger size than the TeX Gyre Adventor designer intended" Nothing more, nothing less. Best wishes, Taco
![](https://secure.gravatar.com/avatar/46562c7d27388490d62e8d7a5bc960dd.jpg?s=120&d=mm&r=g)
On 10/18/2018 10:37 AM, Taco Hoekwater wrote:
Hi Pablo,
Let me go back an try to answer the original question:
On 15 Oct 2018, at 21:21, Pablo Rodriguez
wrote: Dear list,
sorry for this basic question, but what defines the size in a font?
The font designer decides on the ‘natural’ size of the font. There are two parts to this.
First, what the ‘natural’ size indicates is the designer’s _intended use size_ for the font, such that when you plan to use the font “Times-Roman” without any special rescaling, it should in fact be equivalent to “Times-Roman at ’natural size’”.
For most fonts, this ‘natural size’ is 10pt, but special display or footnote fonts may have a different intended use size, and the font designer may have made special glyph adjustments for that purpose. For example, the computer modern family has special fonts with a ‘natural’ size anywhere between 5pt and 17pt. The glyphs in the specific fonts with a smaller ‘natural’ size (like 8pt) are in fact a little bit bolder and wider than the same glyphs in the font designed to be used at 10pt. This makes sense when you consider that the 8pt font is likely be used along with the 10pt font for e.g. footnotes. The 10pt font used at 8pt size would look thinner and weaker than the actual font designed for 8pt.
Second, a design size in points like ‘10pt’ is somewhat misleading, because what it actually is, is just a different way of saying “at the expected size for traditional main text”. The “10pt" is not necessarily a measure of _anything_ in the font. In fact, font designers sometimes do not use a “XXpt” design size at all.The Minion font family has fonts with names like "Minion Pro Caption" and "Minion Pro Display”, which is actually a better indication of the information the font designer wants to convey.
That leaves the question of what the actual size is of a font used at “10pt”. As explained above, there are no hard rules. But usually for a modern font the “10pt" is the _vertical_ space needed to enclose all of the ascenders and descenders in the font when all the glyphs are overlaid on top of each other. Traditionally, this was also the with of an ‘em’, going back to the Roman era, where inscribed text fitted characters into a square. But these days that is no longer always the case, since some font families have condensed or extended members (and it really only applied to ‘upright’ fonts anyways).
In short:
If two fonts have the same size, I think there may be a dimension which has the same length in both. Which one is this?
No, there is no such thing. "TeX Gyre Bonum and TeX Gyre Adventor at twelve point” really only means this:
"TeX Gyre Bonum at a somewhat larger size than the TeX Gyre Bonum designer intended and TeX Gyre Adventor at a somewhat larger size than the TeX Gyre Adventor designer intended"
Nothing more, nothing less. A nice explanation.
In context one can actually scale in two more ways than standard tex but it's more a gimmick than useful: \starttext % at : fraction of design size % sa : fraction of current bodyfont size % ht : fraction of font ascender % cp : fraction of height of glyph X \starttexdefinition ShowThem #1#2#3 \startoverlay {\color[trace:r]{\definedfont[#1*default #3]This is a just a simple line.}} {\color[trace:g]{\definedfont[#2*default #3]This is a just a simple line.}} \stopoverlay \stoptexdefinition \ShowThem {dejavu-sans} {ibmplexsans-regular} {at 12pt} \ShowThem {dejavu-sans} {ibmplexsans-regular} {sa 1} \ShowThem {dejavu-sans} {ibmplexsans-regular} {ht 12pt} \ShowThem {dejavu-sans} {ibmplexsans-regular} {cp 12pt} \blank \ShowThem {dejavu-serif} {texgyrepagella-regular} {at 12pt} \ShowThem {dejavu-serif} {texgyrepagella-regular} {sa 1} \ShowThem {dejavu-serif} {texgyrepagella-regular} {ht 12pt} \ShowThem {dejavu-serif} {texgyrepagella-regular} {cp 12pt} \blank \ShowThem {lmroman12-regular} {lucidabrightot} {at 12pt} \ShowThem {lmroman12-regular} {lucidabrightot} {sa 1} \ShowThem {lmroman12-regular} {lucidabrightot} {ht 12pt} \ShowThem {lmroman12-regular} {lucidabrightot} {cp 12pt} \stoptext ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/5955e8e90611e77ccbfc7721b6112027.jpg?s=120&d=mm&r=g)
On 10/18/18 10:37 AM, Taco Hoekwater wrote:
Hi Pablo,
Let me go back an try to answer the original question: [...] Nothing more, nothing less. Many thanks for your explanation, Taco.
I think the basic issue is clear to me now: different typefaces may have different dimensions (when printed on paper) using the same point size. Many thanks for your help, Pablo -- http://www.ousia.tk
participants (8)
-
Alan Braslau
-
Arthur Reutenauer
-
Hans Hagen
-
Henning Hraban Ramm
-
luigi scarso
-
Pablo Rodriguez
-
Taco Hoekwater
-
Ulrike Fischer