Re: [NTG-context] what defines the font size?
On Tue, Oct 16, 2018 at 7:48 PM Pablo Rodriguez wrote: > > I tried to experiment (modifying TeX Gyre Pagella from 1000 to > 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: texgyrepagella-regular-500.ttx: Also, better to edit the names too: texgyrepagella-regular-2000.ttx: texgyrepagella-regular-2000.ttx: texgyrepagella-regular-2000.ttx: texgyrepagella-regular-500.ttx: texgyrepagella-regular-500.ttx: texgyrepagella-regular-500.ttx: texgyrepagella-regular.ttx: texgyrepagella-regular.ttx: texgyrepagella-regular.ttx: 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: texgyrepagella-regular-500.ttx: texgyrepagella-regular.ttx: 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 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: texgyrepagella-regular-500.ttx: texgyrepagella-regular.ttx: as well as all the other dimensions. In texgyrepagella-regular-500.ttx we have 500 unitsPerEm and hence 500 units in a "glyph space" t
Re: [NTG-context] Questions to font family Pagella
> But for single letters (such as in heading numbers [12.A.γ] and > references to them), I would like to use the Greek glyphs that come with > Pagella. I see: it clearly makes sense to use the same font for Greek and Latin in this particular case; but surely diacritics are not necessary? 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 ___
Re: [NTG-context] Questions to font family Pagella
On 10/18/18 3:51 PM, Arthur Reutenauer wrote: > On Wed, Oct 17, 2018 at 06:17:22PM +0200, Pablo Rodriguez wrote: >> do you know if the new Greek glyphs will be extended to support >> polytonic Greek? > > Not any more than Hans does, but I agree with his assessment that we > shouldn’t count on it. I think it makes more sense to use different > fonts for different writing systems anyway, because it’s easier to find > good fonts that cover only one script; for example the Greek Font > Society (http://www.greekfontsociety-gfs.gr/) makes very good free > fonts, in many different styles. I use the Greek glyphs from GFS Didot for the Greek words of passages in the documents I use with Pagella. But for single letters (such as in heading numbers [12.A.γ] and references to them), I would like to use the Greek glyphs that come with Pagella. Pablo -- http://www.ousia.tk ___ 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 ___
Re: [NTG-context] what defines the font size?
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 ___ 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 ___
Re: [NTG-context] Use \framedtext to write an algorithm (again)
Hi Fabrice, I’m sorry but I don’t understand the question. Can you explain what do you expect from the example but doesn’t work. Wolfgang Fabrice Couvreur schrieb am 17.10.18 um 21:58: Hi Wolfgang, You offered me the following code to write algorithms. It seems that this does not function very well because the withdrawal of the text no longer exists. Thank you Fabrice \defineframedtext [algorithmframe] [width=fit, background=color, backgroundcolor=lightgray, framecolor=darkred, corner=round] \definelines [algorithm] [space=on, before=\startalgorithmframe, after=\stopalgorithmframe] \starttext \startalgorithm Variables \math{I} et \math{J} entiers T tableau d'entiers Début Pour \math{I} allant de \math{1} à \math{3} Pour \math{J} allant de \math{1} à \math{3} Si \math{J>I} Alors \math{T[I, J]=J-I} Sinon \math{T[I, J]=0} Fin Si Fin Pour Fin \stopalgorithm \stoptext ___ 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 ___ ___ 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 ___
Re: [NTG-context] Questions to font family Pagella
Am 2018-10-18 um 15:51 schrieb Arthur Reutenauer : > On Wed, Oct 17, 2018 at 06:17:22PM +0200, Pablo Rodriguez wrote: >> do you know if the new Greek glyphs will be extended to support >> polytonic Greek? > > Not any more than Hans does, but I agree with his assessment that we > shouldn’t count on it. I think it makes more sense to use different > fonts for different writing systems anyway, because it’s easier to find > good fonts that cover only one script; for example the Greek Font > Society (http://www.greekfontsociety-gfs.gr/) makes very good free > fonts, in many different styles. BTW I’m trying to use GFS Neohellenic in a project, and while I like the "raw & ancient" style, the font’s spacing is not really beautiful, esp. the spaces are too wide. Can I change space width in a typescript? Greetlings, Hraban --- https://www.fiee.net http://wiki.contextgarden.net https://www.dreiviertelhaus.de GPG Key ID 1C9B22FD ___ 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 ___
Re: [NTG-context] Questions to font family Pagella
On Wed, Oct 17, 2018 at 06:17:22PM +0200, Pablo Rodriguez wrote: > do you know if the new Greek glyphs will be extended to support > polytonic Greek? Not any more than Hans does, but I agree with his assessment that we shouldn’t count on it. I think it makes more sense to use different fonts for different writing systems anyway, because it’s easier to find good fonts that cover only one script; for example the Greek Font Society (http://www.greekfontsociety-gfs.gr/) makes very good free fonts, in many different styles. 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 ___
Re: [NTG-context] what defines the font size?
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 - ___ 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 ___
Re: [NTG-context] what defines the font size?
On Wed, Oct 17, 2018 at 6:15 PM Pablo Rodriguez wrote: > 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 ___ 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 ___
Re: [NTG-context] what defines the font size?
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 ___ 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 ___
Re: [NTG-context] what defines the font size?
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 - ___ 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 ___
Re: [NTG-context] what defines the font size?
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 ___ 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 ___