Re: [NTG-context] Auto selecting optical sizes for a font
On 6/25/2013 6:16 AM, Andres Conrado Montoya wrote: Thank you so much, Hans. :) It works great!. I must agree, however, with Georg's considerations. I am very grateful for the current solution, but an automatic selection of optical sizes could be insanely good, from a book designer point of view (I'm a book designer). Just for the curious, these are some links that go deeper in the theme of Optical Sizes for Typography: Optical sizes have always been part of tex (macro packages) and are also one of the reasons why tex font subsystems are complex: - fonts often provide only some styles / variants in sizes, so fallbacks need to be supported - names are highly inconsistent, so there is no systematic robust solution that automates it - only a few fonts provide optical sizes and the whole font machinery must not suffer (in performance) from this - fonts can be combined in any way with other designs (and we also need to take math into account) Now, the only case where optical sizes are really robustly implemented is in open type math as there the shapes are in one file and by opening this one file one gets all the information: no need to analyze names and whatever and deduce if/where the other sizes sit. The alternative set can have a smaller repertoire too. This is more complex when sizes are spread over fonts. One cannot rely on the names of files (name8whatever vs name05whatever vs namewhatever4 etc) so one has to analyze the font son the system but often internal names in the font also suffer from this. Then there are combinations of 'bare name' (should have no number in it), weight, width, style, whatever and again this is not guaranteed consistent. You really don't want to know how much time went into figuring out a decent way to analyze fonts on the system and make sure that users at least with a certain degree of certainty can use a 'name:' or even 'spec:' locator. Personally I *never* use font names but only trust filenames because i don't want to be surprised by an updated where internal names changed and (in automated flows) fonts sort of dissappear due to this. And, the designsize feature combined with lfg files guarantee me that I can still use designsizes then (after all, texies expect lm designsizes to be supported). So, back to optical sizes. As said, they are supported. If one has the goodie file (will be in next upload) and asks for the eb bodyfont in the way demonstrated in the typescript size matching logic will be applied. But in a controlled way, so you know what you get. But nevertheless it's automatic then. (In your sample code you used some size key, in context we specify that we want to use designsizes so it all boils down to specifying anyway.) Any further automation will only make things worse: nothing is as frustrating as fighting built in cleverness. Now, I'll not go into details to much about eb (which is a nice font btw) but the fact that in a font file there is mention of a design size range is nothing special: many fonts in my texmf-fonts tree have such ranges and most of them have only one optical size, so one thing a selector then has to figure out is: are there more. And of course there are, if you look at some properties, because of inconsistent naming and tagging as mentioned, following some logic, all kind of antykwa fonts suddenly could end op in a pool of optical sizes but they are in fact all different in specific properties. The same is true for more fonts. So what should one look at? The filename: no universal system behind it. The font name? Idem, some have a number (size) in it some haven't. Qualifiers like Italic Ital Ita are all used mixed. Some fonts have extra flags? But often these have weird values so one cannot rely too much on it. We see things like [design_range_bottom]=0, [design_range_top]=94, [design_size]=80, [encodingchanged]=0, [extrema_bound]=0, [familyname]=EB Garamond 08, [fontname]=EBGaramond08-Italic, [fontstyle_id]=2, [fontstyle_name]={ { [lang]=1033, [name]=Italic, }, }, and [compatfull]=EB Garamond 08 Italic, [family]=EB Garamond 08, [fullname]=EB Garamond 08 Italic, [postscriptname]=EBGaramond08-Italic, [preffamilyname]=EB Garamond, [prefmodifiers]=08 Italic, [subfamily]=Italic, [uniqueid]=FontForge 2.0 : EB Garamond 08 Italic : 2-1-2013, So how is a system supposed to know to look for EBGaramond12-Italic or EBGaramond4Italic or whatever. Some heuristics have to be applied and as I mentioned in an earlier mail, I played a bit with it and although I can make you happy by supporting EB sizing automatic (of course with toms way to disable it) another user will be bitten by false matches and missing ones for other fonts (hard to trace). To be honest: I'd already given up on fonts and names and whatever being systematic and logic etc ... Just as I've also given up on open type guaranteeing consistency or open type math
Re: [NTG-context] Auto selecting optical sizes for a font
Thank you so much Hans, for your answer. I understand how difficult it is. The goodie file works very well, and I'm perfectly happy with that. :) Thank you again. Andrés Conrado Montoya El Andi andresconr...@gmail.com http://chiquitico.org Los fines no justifican los medios, porque la medida verdadera de nuestro carácter está dada por los medios que estamos dispuestos a utilizar, no por los fines que proclamamos. Por favor, evite enviarme documentos adjuntos en formato Word o PowerPoint. Lea http://www.gnu.org/philosophy/no-word-attachments.es.html Naturalmente, la gente normal no desea la guerra, pero al final son los líderes de una nación quienes determinan su política, y resulta muy sencillo doblegar a la gente, sea una democracia, una dictadura fascista, un parlamento o una dictadura comunista. Con voz o sin voz, la gente siempre podrá entregarse a la voluntad de sus líderes. Es fácil. Lo único que hay que hacer es decirles que están siendo atacados, y denunciar a los pacifistas por su falta de patriotismo y exponer el país al peligro. Funciona igual en todos los países. ---Hermann Goering, en los juicios de Nuremberg. ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Auto selecting optical sizes for a font
HI Georg, All, as such ConTexT should support the use of the size table in its font handling, but as Hans has mentioned design sizes a very special and few actually know what that information means and put it to a useful purpose. Question would be in far this font feature should be rudimentarily supported. regards Keith. Am 24.06.2013 um 00:28 schrieb Georg Duffner g.duff...@gmail.com: Am 22.06.2013 16:57, schrieb Hans Hagen: We have no feature 'size' (or I must have forgotten about it). As there is no consistency in designsizes and there is always some esthetic choice involved no automatic mechanism is (and will be) build in. Hi, There is a 'size' table in opentype fonts which contains informations about the design size, the design range and a style-ID and -name. Fonts that come with different optical sizes do in fact use that table exactly for the purpose desired by Andrés. Latin Modern does so, Adobe fonts do so and EB Garamond happens to use that table too. XeLaTeX and LuaLaTeX interpret it correctly (by means of fontspec, IIRC). So perhaps it’s worth reconsidering this. Best regards, Georg ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Auto selecting optical sizes for a font
Am 2013-06-24 10:27, schrieb Keith J. Schultz: as such ConTexT should support the use of the size table in its font handling, but as Hans has mentioned design sizes a very special and few actually know what that information means and put it to a useful purpose. Question would be in far this font feature should be rudimentarily supported. IMO, they should be fully supported. There are not so many fonts with that property and even less in the free software world, so one can assume that somebody possessing such font knows what that means and probably expects its support. I think, context should by default use the appropriate font for each font-size corresponding to the design range defined in the font’s table, while providing an interface to override that automatism. Best regards, Georg ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Auto selecting optical sizes for a font
On 6/24/2013 12:28 AM, Georg Duffner wrote: Am 22.06.2013 16:57, schrieb Hans Hagen: We have no feature 'size' (or I must have forgotten about it). As there is no consistency in designsizes and there is always some esthetic choice involved no automatic mechanism is (and will be) build in. Hi, There is a 'size' table in opentype fonts which contains informations about the design size, the design range and a style-ID and -name. Fonts that come with different optical sizes do in fact use that table exactly for the purpose desired by Andrés. Latin Modern does so, Adobe fonts do so and EB Garamond happens to use that table too. XeLaTeX and LuaLaTeX interpret it correctly (by means of fontspec, IIRC). So perhaps it’s worth reconsidering this. It's too much trouble for the few fonts that come in design sizes. As typescripts need to be defined adding the bit of extra info is no problem. I had a look at the relevant info and in order to make it work with the context font loader (the name driven one, as for files it is irrelevant anyway) quite some fuzzy logic has to be applied: we need a proper way (at least in context) to identify regular, italic, bold italic etc combined with the font name and the fact that names (as well as modifiers) are poluted makes that for lm a different logic has to be applied than for eb and if I don't do some filtering we get an inconsistent lot of of antykwas being seen as a design size collection as well. I just tried to make a an auto-internal-goodie generator and some tracing showed me that if we can get 50% done right, we need to work around the other 50%. (I have lots of fonts on my system). So for the moment I'll stick to providing goodies files. After all, users load a relevant typescript anyway so much gets hidden. If we get dozens of design sized files I'll look into it again. Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Auto selecting optical sizes for a font
On 6/24/2013 10:02 AM, Keith J. Schultz wrote: HI Georg, All, as such ConTexT should support the use of the size table in its font handling, but as Hans has mentioned design sizes a very special and few actually know what that information means and put it to a useful purpose. Question would be in far this font feature should be rudimentarily supported. it is (and has always been) supported, given that one loads the goodie file and sets the option, and it's not even that rudimentary (and as you say, design sizes are dangerous when misused) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Auto selecting optical sizes for a font
On 6/24/2013 11:49 AM, Georg Duffner wrote: Am 2013-06-24 10:27, schrieb Keith J. Schultz: as such ConTexT should support the use of the size table in its font handling, but as Hans has mentioned design sizes a very special and few actually know what that information means and put it to a useful purpose. Question would be in far this font feature should be rudimentarily supported. IMO, they should be fully supported. There are not so many fonts with that property and even less in the free software world, so one can assume that somebody possessing such font knows what that means and probably expects its support. It doesn't change the fact that predictable font names (including weight, width, variant and modifier) are (and will remain) a mess so users need to know precisely what they ask for, even automatisms kick in. Ok, most users won't notice as dont definition files take care of loading, but in that case taking care of the designsizes can be hidden as well (which it is). I think, context should by default use the appropriate font for each font-size corresponding to the design range defined in the font’s table, while providing an interface to override that automatism. Well, in that case we should also obey min/max specs that say that fonts cannot be used below or above certain sizes (and I found quite some that has such narrow ranges). In the case of eb ... it's just a few entries in a goodie file, so that does the job. In pratice, finding a properly matched and sized monospace and math takes more time -) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Auto selecting optical sizes for a font
Thank you so much, Hans. :) It works great!. I must agree, however, with Georg's considerations. I am very grateful for the current solution, but an automatic selection of optical sizes could be insanely good, from a book designer point of view (I'm a book designer). Just for the curious, these are some links that go deeper in the theme of Optical Sizes for Typography: 1. http://www.adobe.com/type/topics/opticalsize.html 2. http://graphicdesign.stackexchange.com/questions/8552/should-i-be-concerned-about-optimal-font-size-for-a-particular-font 3. http://ilovetypography.com/2012/04/11/designing-type-systems/ 4. Book: Typography Monographs Vol. 2 - Size-specific Adjustments to Type Designs: An Investigation of the Principles Guiding the Design of Optical Sizes by Tim Ahrens, MA. http://markbattypublisher.com/books/typography-monographs-volume-2-size-specific-adjustments-to-type-designs-an-investigation-of-the-principles-guiding-the-design-of-optical-sizes/ Thank you all. :) Andrés Conrado Montoya El Andi andresconr...@gmail.com http://chiquitico.org http://twitter.com/conradolandia Los fines no justifican los medios, porque la medida verdadera de nuestro carácter está dada por los medios que estamos dispuestos a utilizar, no por los fines que proclamamos. “You develop an instant global consciousness, a people orientation, an intense dissatisfaction with the state of the world, and a compulsion to do something about it. From out there on the moon, international politics look so petty. You want to grab a politician by the scruff of the neck and drag him a quarter of a million miles out and say, ‘Look at that, you son of a bitch.’” — Apollo 14 astronaut Edgar Mitchell ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Auto selecting optical sizes for a font
Am 22.06.2013 16:57, schrieb Hans Hagen: We have no feature 'size' (or I must have forgotten about it). As there is no consistency in designsizes and there is always some esthetic choice involved no automatic mechanism is (and will be) build in. Hi, There is a 'size' table in opentype fonts which contains informations about the design size, the design range and a style-ID and -name. Fonts that come with different optical sizes do in fact use that table exactly for the purpose desired by Andrés. Latin Modern does so, Adobe fonts do so and EB Garamond happens to use that table too. XeLaTeX and LuaLaTeX interpret it correctly (by means of fontspec, IIRC). So perhaps it’s worth reconsidering this. Best regards, Georg ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Auto selecting optical sizes for a font
On 22/06/13 01:43, Andres Conrado Montoya wrote: Hello friends. I'm trying to design a book using the typescript you can find at the end of this message. I'm using the beautiful EBGaramond fonts from Georg Duffner (http://www.georgduffner.at/ebgaramond/). This font provides optical sizes to be used in different sizes (named 12 for 10.1pt or more, and 8 for 10 or less. These fonts automatically work as expected in latex, thanks to a recent package included in CTAN (ebgaramond package), selecting the correct font for the appropriate size. However, the typescript I'm using selects the 8 size for everything, without taking the type size into consideration. Is there any way to make ConTeXt do this automatic selection of fonts regarding of type size? I'm using version 2013.06.10 22:51. Hi Andrés, sorry for not giving more information on this, because I don't understand how it works. Here you have an example: http://wiki.contextgarden.net/Optical_Size. (I guess you forgot the font assignment.) Wolfgang, wouldn't it be possible to implement optical sizes in simplefonts? So the user could benefit from ease of use. 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Auto selecting optical sizes for a font
On 6/22/2013 1:43 AM, Andres Conrado Montoya wrote: Hello friends. I'm trying to design a book using the typescript you can find at the end of this message. I'm using the beautiful EBGaramond fonts from Georg Duffner (http://www.georgduffner.at/ebgaramond/). This font provides optical sizes to be used in different sizes (named 12 for 10.1pt or more, and 8 for 10 or less. These fonts automatically work as expected in latex, thanks to a recent package included in CTAN (ebgaramond package), selecting the correct font for the appropriate size. However, the typescript I'm using selects the 8 size for everything, without taking the type size into consideration. Is there any way to make ConTeXt do this automatic selection of fonts regarding of type size? I'm using version 2013.06.10 22:51. We have no feature 'size' (or I must have forgotten about it). As there is no consistency in designsizes and there is always some esthetic choice involved no automatic mechanism is (and will be) build in. However, as the traditional tex fonts come in designsizes we do have a way to deal with them via so called font goodies. I made you a goodie file for ebgaramond as well as typescript. (You need to convince Mojca to add the otf fonts to the distribution.) Just put the goodie and typescript files in the base path and run mtxrun --generate after that. We need to choose a proper matching math font (or seek funding for a gust garamond math font project). The demo file shows how to kick in Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - return { name = eb garamond, version = 1.00, comment = Goodies that complement eb garamond., author = Hans Hagen, copyright = ConTeXt development team, designsizes = { [EBGaramond-Italic] = { [8pt] = file:EBGaramond08-Italic, [9pt] = file:EBGaramond08-Italic, [10pt] = file:EBGaramond08-Italic, [11pt] = file:EBGaramond12-Italic, [12pt] = file:EBGaramond12-Italic, default = file:EBGaramond12-Italic, }, [EBGaramond-Regular] = { [8pt] = file:EBGaramond08-Regular, [9pt] = file:EBGaramond08-Regular, [10pt] = file:EBGaramond08-Regular, [11pt] = file:EBGaramond12-Regular, [12pt] = file:EBGaramond12-Regular, default = file:EBGaramond12-Regular, }, [EBGaramond-SC] = { [8pt] = file:EBGaramond08-SC, [9pt] = file:EBGaramond08-SC, [10pt] = file:EBGaramond08-SC, [11pt] = file:EBGaramond12-SC, [12pt] = file:EBGaramond12-SC, default = file:EBGaramond12-SC, }, [EBGaramond-Bold] = { default = file:EBGaramond12-Bold, }, [EBGaramond-AllSC] = { default = file:EBGaramond12-AllSC, }, [EBGaramond-Initials] = { default = file:EBGaramondInitials, }, [EBGaramond-InitialsF1] = { default = file:EBGaramondInitialsF1, }, [EBGaramond-InitialsF2] = { default = file:EBGaramondInitialsF2, }, } } %D \module %D [ file=type-imp-ebgaramond, %Dversion=2013.06.22, %D title=\CONTEXT\ Typescript Macros, %D subtitle=EB Garamond, %D author=Hans Hagen, %D date=\currentdate, %D copyright={PRAGMA ADE \ \CONTEXT\ Development Team}] %C %C This module is part of the \CONTEXT\ macro||package and is %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. \definefontfeature [eb-garamond-normal] [default] [mode=node,ccmp=yes,calt=yes, liga=yes,dlig=yes,hlig=yes, kern=yes,mark=yes,mkmk=yes, onum=yes,pnum=yes,salt=yes, script=latn] \definefontfeature [eb-garamond-smallcaps] [eb-garamond-normal] [smcp=yes,c2sc=yes] \starttypescriptcollection[ebgaramond] \starttypescript [serif] [ebgaramond] \loadfontgoodies[ebgaramond] \setups[font:fallback:serif] \definefontsynonym [Serif] [file:ebgaramond-regular] [features=eb-garamond-normal] \definefontsynonym [SerifItalic] [file:ebgaramond-italic] [features=eb-garamond-normal] \definefontsynonym [SerifBold] [file:ebgaramond-bold] [features=eb-garamond-normal] \definefontsynonym [SerifCaps] [Serif] [features=eb-garamond-smallcaps] \stoptypescript \starttypescript[ebgaramond] \definetypeface [ebgaramond] [rm] [serif] [ebgaramond] [default] [designsize=auto] \definetypeface [ebgaramond] [tt] [mono] [dejavu]
[NTG-context] Auto selecting optical sizes for a font
Hello friends. I'm trying to design a book using the typescript you can find at the end of this message. I'm using the beautiful EBGaramond fonts from Georg Duffner (http://www.georgduffner.at/ebgaramond/). This font provides optical sizes to be used in different sizes (named 12 for 10.1pt or more, and 8 for 10 or less. These fonts automatically work as expected in latex, thanks to a recent package included in CTAN (ebgaramond package), selecting the correct font for the appropriate size. However, the typescript I'm using selects the 8 size for everything, without taking the type size into consideration. Is there any way to make ConTeXt do this automatic selection of fonts regarding of type size? I'm using version 2013.06.10 22:51. Here is my example: %%% \enableregime[utf-8] \mainlanguage[es] \setupcapitals[sc=yes] \definefontfeature[default][default] [mode=node,calt=yes,liga=yes,dlig=yes,hlig=yes,ccmp=yes,kern=yes,mark=yes,mkmk=yes,onum=yes,pnum=yes,salt=yes,size=yes,expansion=quality,protrusion=quality] \definefontfeature[smallcaps][smallcaps] [mode=node,script=latn,smcp=yes,c2sc=yes,calt=yes,liga=yes,dlig=yes,hlig=yes,ccmp=yes,kern=yes,mark=yes,mkmk=yes,onum=yes,pnum=yes,salt=yes,size=yes,expansion=quality,protrusion=quality] \starttypescript[serif][ebgaramond] \setups[font:fallback:serif] \definefontsynonym [EBGaramond-Regular][name:EBGaramond-Regular] \definefontsynonym [EBGaramond-Italic] [name:EBGaramond-Italic] \stoptypescript \starttypescript[serif][ebgaramond] \definefontsynonym [Serif] [EBGaramond-Regular] [features=default] \definefontsynonym [SerifItalic] [EBGaramond-Italic] [features=default] \definefontsynonym [SerifCaps] [Serif] [features=smallcaps] \stoptypescript \definetypeface[ebg][rm][serif][ebgaramond][default] \setupbodyfont[ebg,12pt] \setupbodyfontenvironment[default][em=italic] \setupinterlinespace[line=3.2ex] \setupalign[lesshyphenation,hz,hanging] \doublehyphendemerits=3 \setupspacing[packed] \starttext \showframe \showgrid \input tufte \stoptext %%% Thank so much for all your good work and help. :) ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___