Hi, I uploaded a new beta. As a prelude to some updates / improvements in the font handling an experimental new otf fontloader/handler is present. This one is not used by default but will likely replace the current one (only when it has been tested enough). At that time also some other pending changes will happen (no functional differences, only improvements). There are a few advantages to the new approach: - Indentifying fonts goes a bit faster (some 20 times) but that is already in the core. - The mem footprint of initial loading a font is smaller. - Initial loading can a bit slower depending on the kind of font (no big deal as we cache files) and if really needed can be sped up a bit. - The cached instance is smaller. - Loading the cached font is faster (not that it was slow but still). - Some bits and pieces have been optimized (there is room for more but I might decide not to do that). - Extra substitution features like tlig and trep are now runtime and not cached. - Processing in node mode can be somewhat faster for complex fonts. - The generic font code will stay as it is for at least a while after the new code has become stable and the current method will stay around too. Of course there will be bugs although the test suite runs without crashing. I will use the new code on my machine but you can test it with: \usemodule[newotf] before \starttext (or in cont-loc.mkiv). 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 -----------------------------------------------------------------
On 07/09/2015 03:39 PM, Hans Hagen wrote:
Of course there will be bugs although the test suite runs without crashing. I will use the new code on my machine but you can test it with:
\usemodule[newotf]
before \starttext (or in cont-loc.mkiv).
Hi Hans, did the new font mechanism really make it into the beta you uploaded? I get resolvers > modules > 'newotf' is not found with version: 2015.07.10 00:05 Thomas
On 07/10/2015 05:05 PM, Thomas A. Schmitz wrote:
On 07/09/2015 03:39 PM, Hans Hagen wrote:
Of course there will be bugs although the test suite runs without crashing. I will use the new code on my machine but you can test it with:
\usemodule[newotf]
before \starttext (or in cont-loc.mkiv).
Hi Hans,
did the new font mechanism really make it into the beta you uploaded? I get
resolvers > modules > 'newotf' is not found
with
version: 2015.07.10 00:05
Hi Hans and Thomas the module seems to be missing also in beta from 2015.07.09 15:23. In beta from 2015.07.10 00:05 cont-loc.mkiv seems to be gone. Pablo -- http://www.ousia.tk
On 7/10/2015 7:13 PM, Pablo Rodriguez wrote:
On 07/10/2015 05:05 PM, Thomas A. Schmitz wrote:
On 07/09/2015 03:39 PM, Hans Hagen wrote:
Of course there will be bugs although the test suite runs without crashing. I will use the new code on my machine but you can test it with:
\usemodule[newotf]
before \starttext (or in cont-loc.mkiv).
Hi Hans,
did the new font mechanism really make it into the beta you uploaded? I get
resolvers > modules > 'newotf' is not found
with
version: 2015.07.10 00:05
Hi Hans and Thomas
the module seems to be missing also in beta from 2015.07.09 15:23.
In beta from 2015.07.10 00:05 cont-loc.mkiv seems to be gone.
that one is not in the distribution ... you can create it cont-new.mkiv : in distribution (patch file) cont-loc.mkiv : local file (persistent, not replaced) cont-exp.mkiv : experimental code (on my machine) 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 -----------------------------------------------------------------
On 7/10/2015 5:05 PM, Thomas A. Schmitz wrote:
On 07/09/2015 03:39 PM, Hans Hagen wrote:
Of course there will be bugs although the test suite runs without crashing. I will use the new code on my machine but you can test it with:
\usemodule[newotf]
before \starttext (or in cont-loc.mkiv).
Hi Hans,
did the new font mechanism really make it into the beta you uploaded? I get
resolvers > modules > 'newotf' is not found
i had a typo in the zip maker ... that file is missing (the rest is there) (i've send the file send in another mail to list) 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 -----------------------------------------------------------------
On 07/11/2015 01:33 AM, Hans Hagen wrote:
On 7/10/2015 5:05 PM, Thomas A. Schmitz wrote:
[...] resolvers > modules > 'newotf' is not found
i had a typo in the zip maker ... that file is missing (the rest is there)
(i've send the file send in another mail to list)
Many thanks for the module file, Hans. I’m afraid that newotf crashes with this sample: \definefallbackfamily [mainface] [rm] [GFS Didot] [preset=range:greek] \definefontfamily [mainface] [rm] [TeX Gyre Pagella] \setupbodyfont [mainface] \starttext αβγ \stoptext Pablo -- http://www.ousia.tk
On 7/11/2015 7:17 AM, Pablo Rodriguez wrote:
On 07/11/2015 01:33 AM, Hans Hagen wrote:
On 7/10/2015 5:05 PM, Thomas A. Schmitz wrote:
[...] resolvers > modules > 'newotf' is not found
i had a typo in the zip maker ... that file is missing (the rest is there)
(i've send the file send in another mail to list)
Many thanks for the module file, Hans.
I’m afraid that newotf crashes with this sample:
\definefallbackfamily [mainface] [rm] [GFS Didot] [preset=range:greek]
\definefontfamily [mainface] [rm] [TeX Gyre Pagella]
\setupbodyfont [mainface]
\starttext αβγ \stoptext
define crashes ... i donwloaded the font, ran mtxrun --generate and remade the font database and this works: [GFS Didot Classic] There can be some subtle differences in names (i checked all 2000 fonts on my machine) which is due to the fact that we stay a bit closer to the originals (in the ff approach quite some juggling with names happens, the same is true for glyph names). We now a bit closer to the otf spec (i hope). 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 -----------------------------------------------------------------
On 07/11/2015 10:53 AM, Hans Hagen wrote:
On 7/11/2015 7:17 AM, Pablo Rodriguez wrote:
[...] I’m afraid that newotf crashes with this sample: [...] define crashes ... i donwloaded the font, ran mtxrun --generate and remade the font database and this works:
[GFS Didot Classic]
I have this font installed too and I’m afraid it gives the same error. The fonts I meant are these ones: http://www.greekfontsociety.gr/GFS_DIDOT_OT.zip. (GFS Didot Classic is a slightly different font.) With crashing I meant no PDF generation because a not found font. The font is there (log attached): $ fc-list GFSDidot /usr/share/fonts/ousia/GFSDidotBoldItalic.otf: GFS Didot:style=Bold Italic /usr/share/fonts/ousia/GFSDidotBold.otf: GFS Didot,GFS Didot Rg:style=Bold /usr/share/fonts/ousia/GFSDidotItalic.otf: GFS Didot:style=Italic /usr/share/fonts/ousia/GFSDidot.otf: GFS Didot:style=Regular And if I don’t load the newotf module, the font is loaded fine: used file > 7: filename=/usr/share/fonts/ousia/GFSDidot.otf format=otf foundname=/usr/share/fonts/ousia/GFSDidot.otf usedmethod=direct This is weird, since if I load a non-existent font (such as Impossibila), compilation generates a PDF file. No glyph replacement, of course, Sorry, but not even adding either of this options works with newotf: tf=file:GFSDidot.otf tf=style:regular What am I doing wrong? Many thanks for your help, Pablo -- http://www.ousia.tk
On 7/11/2015 1:15 PM, Pablo Rodriguez wrote:
On 07/11/2015 10:53 AM, Hans Hagen wrote:
On 7/11/2015 7:17 AM, Pablo Rodriguez wrote:
[...] I’m afraid that newotf crashes with this sample: [...] define crashes ... i donwloaded the font, ran mtxrun --generate and remade the font database and this works:
[GFS Didot Classic]
I have this font installed too and I’m afraid it gives the same error.
The fonts I meant are these ones: http://www.greekfontsociety.gr/GFS_DIDOT_OT.zip. (GFS Didot Classic is a slightly different font.)
With crashing I meant no PDF generation because a not found font. The font is there (log attached):
$ fc-list GFSDidot /usr/share/fonts/ousia/GFSDidotBoldItalic.otf: GFS Didot:style=Bold Italic /usr/share/fonts/ousia/GFSDidotBold.otf: GFS Didot,GFS Didot Rg:style=Bold /usr/share/fonts/ousia/GFSDidotItalic.otf: GFS Didot:style=Italic /usr/share/fonts/ousia/GFSDidot.otf: GFS Didot:style=Regular
And if I don’t load the newotf module, the font is loaded fine:
used file > 7: filename=/usr/share/fonts/ousia/GFSDidot.otf format=otf foundname=/usr/share/fonts/ousia/GFSDidot.otf usedmethod=direct
This is weird, since if I load a non-existent font (such as Impossibila), compilation generates a PDF file. No glyph replacement, of course,
Sorry, but not even adding either of this options works with newotf:
tf=file:GFSDidot.otf
tf=style:regular
What am I doing wrong?
That is a weird error as when no font is found and loaded nothing gets passed to the backend so this error is weird. 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 -----------------------------------------------------------------
Pablo Rodriguez schrieb:
On 07/11/2015 01:33 AM, Hans Hagen wrote:
On 7/10/2015 5:05 PM, Thomas A. Schmitz wrote:
[...] resolvers> modules> 'newotf' is not found i had a typo in the zip maker ... that file is missing (the rest is there)
(i've send the file send in another mail to list)
Many thanks for the module file, Hans.
I’m afraid that newotf crashes with this sample:
\definefallbackfamily [mainface] [rm] [GFS Didot] [preset=range:greek]
\definefontfamily [mainface] [rm] [TeX Gyre Pagella]
\setupbodyfont [mainface]
\starttext αβγ \stoptext
The font [1,2] works for me without problems. [1] http://www.greekfontsociety.gr/pages/en_typefaces20th.html [2] http://www.greekfontsociety.gr/pages/en_typefaces19th.html Wolfgang
On 07/11/2015 12:57 PM, Wolfgang Schuster wrote:
[...] The font [1,2] works for me without problems.
[1] http://www.greekfontsociety.gr/pages/en_typefaces20th.html [2] http://www.greekfontsociety.gr/pages/en_typefaces19th.html
They all work fine for me until I load: \usemodule[newotf] And I don’t know what is wrong here. Many thanks for your help, Pablo -- http://www.ousia.tk
Pablo Rodriguez schrieb:
On 07/11/2015 12:57 PM, Wolfgang Schuster wrote:
[...] The font [1,2] works for me without problems.
[1] http://www.greekfontsociety.gr/pages/en_typefaces20th.html [2] http://www.greekfontsociety.gr/pages/en_typefaces19th.html
They all work fine for me until I load:
\usemodule[newotf]
And I don’t know what is wrong here.
Many thanks for your help,
Do you get the same problem when you use the font as main font? \usemodule[newotf] \definefontfamily[mainface][rm][GFS Didot] \setupbodyfont[mainface] \starttext αβγ {\bf αβγ} \stoptext Wolfgang
On 07/11/2015 01:26 PM, Wolfgang Schuster wrote:
[...] Do you get the same problem when you use the font as main font?
\usemodule[newotf]
\definefontfamily[mainface][rm][GFS Didot]
\setupbodyfont[mainface]
\starttext αβγ {\bf αβγ} \stoptext
Yes, I do. Pablo -- http://www.ousia.tk
On 07/11/2015 02:02 PM, Pablo Rodriguez wrote:
Do you get the same problem when you use the font as main font?
\usemodule[newotf]
\definefontfamily[mainface][rm][GFS Didot]
\setupbodyfont[mainface]
\starttext αβγ {\bf αβγ} \stoptext
Yes, I do.
Pablo
Both Wolfgang's file and your original test file compile cleanly here, so it must be something on your system. Thomas
Pablo Rodriguez schrieb:
On 07/11/2015 01:26 PM, Wolfgang Schuster wrote:
[...] Do you get the same problem when you use the font as main font?
\usemodule[newotf]
\definefontfamily[mainface][rm][GFS Didot]
\setupbodyfont[mainface]
\starttext αβγ {\bf αβγ} \stoptext
Yes, I do.
1. Does the same happen with other fonts in this folder. 2. What happens when you put the fonts in your local TeX directory (or texmf-fonts/fonts/opentype of your context installation). Wolfgang
On 07/11/2015 02:32 PM, Wolfgang Schuster wrote:
[...] 1. Does the same happen with other fonts in this folder.
2. What happens when you put the fonts in your local TeX directory (or texmf-fonts/fonts/opentype of your context installation).
Many thanks for your replies, Thomas and Wolfgang. My font directory /usr/share/fonts/ousia/ is actually a symlink to /home/ousia/Documents/ousia-fonts/. It worked fine until newotf. I replaced the symlink. Now the font directory points to tex/texmf-fonts. After changing this, both the sample I provided and the one from Wolfgang work fine. I wonder why symlinks aren’t followed in the first case. But I’m afraid I have a problematic font: otf reader > fatal error in file '/home/ousia/ctxbeta/tex/texmf-fonts/ousia-fonts/Mechanica.otf': .../ctxbeta/tex/texmf-context/tex/context/base/util-fil.lua:24: table index is nil I converted it from the typewritten fonts that came with txfonts. What is wrong in the font? Many thanks for your help, Pablo -- http://www.ousia.tk
Pablo Rodriguez schrieb:
On 07/11/2015 02:32 PM, Wolfgang Schuster wrote:
[...] 1. Does the same happen with other fonts in this folder.
2. What happens when you put the fonts in your local TeX directory (or texmf-fonts/fonts/opentype of your context installation).
Many thanks for your replies, Thomas and Wolfgang.
My font directory /usr/share/fonts/ousia/ is actually a symlink to /home/ousia/Documents/ousia-fonts/.
It worked fine until newotf. I replaced the symlink. Now the font directory points to tex/texmf-fonts.
After changing this, both the sample I provided and the one from Wolfgang work fine.
I wonder why symlinks aren’t followed in the first case.
But I’m afraid I have a problematic font:
otf reader> fatal error in file '/home/ousia/ctxbeta/tex/texmf-fonts/ousia-fonts/Mechanica.otf': .../ctxbeta/tex/texmf-context/tex/context/base/util-fil.lua:24: table index is nil
I converted it from the typewritten fonts that came with txfonts.
What is wrong in the font?
It works for me when I use the Postscript files from the txfonts package, you need the following files: - txbtt.afm - txbtt.pfb - txbttsc.afm % Only needed when you want bold smallcaps - txbttsc.pfb % Only needed when you want bold smallcaps - txtt.afm - txtt.pfb - txttsc.afm % Only needed when you want smallcaps - txttsc.pfb % Only needed when you want smallcaps To use them put the files in your local TeX directory (e.g. texmf-fonts/fonts/data). %%%% begin example \definefontfamily [txfont] [tt] [txtt] [bf=file:txbtt, it=features:{default,slanted}, bi=features:{default,slanted}] \setupbodyfont[txfont] \starttext Test {\it Text} {\bf Text} {\bi Text} \stoptext %%%% end example Wolfgang
On 07/11/2015 05:23 PM, Wolfgang Schuster wrote:
[...] It works for me when I use the Postscript files from the txfonts package, you need the following files:
Many thanks for your reply, Wolfgang. I wanted to avoid using PostScript files, but it seems that I have to use them. Many thanks for your help, Pablo -- http://www.ousia.tk
On 7/11/2015 4:27 PM, Pablo Rodriguez wrote:
On 07/11/2015 02:32 PM, Wolfgang Schuster wrote:
[...] 1. Does the same happen with other fonts in this folder.
2. What happens when you put the fonts in your local TeX directory (or texmf-fonts/fonts/opentype of your context installation).
Many thanks for your replies, Thomas and Wolfgang.
My font directory /usr/share/fonts/ousia/ is actually a symlink to /home/ousia/Documents/ousia-fonts/.
It worked fine until newotf. I replaced the symlink. Now the font directory points to tex/texmf-fonts.
After changing this, both the sample I provided and the one from Wolfgang work fine.
I wonder why symlinks aren’t followed in the first case.
maybe some difference in opening a file in lua or directlky in c .. 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 -----------------------------------------------------------------
Hi Hans,
the new beta, 2015.07.10 00:05, messes up punctuation (.:,;) for some fonts
like Calluna. This happens with and without \usemodule[newotf]:
\definefontfamily [default] [rm] [Calluna]\setupbodyfont [default]
\starttext
This is not, as it should be; Email: email@example.net\stoptext
renders as:
This is not’ as it should be’ Email’ email@example’net
[image: Inline-Bild 1]
Dominik
2015-07-09 15:39 GMT+02:00 Hans Hagen
Hi,
I uploaded a new beta. As a prelude to some updates / improvements in the font handling an experimental new otf fontloader/handler is present. This one is not used by default but will likely replace the current one (only when it has been tested enough). At that time also some other pending changes will happen (no functional differences, only improvements).
There are a few advantages to the new approach:
- Indentifying fonts goes a bit faster (some 20 times) but that is already in the core. - The mem footprint of initial loading a font is smaller. - Initial loading can a bit slower depending on the kind of font (no big deal as we cache files) and if really needed can be sped up a bit. - The cached instance is smaller. - Loading the cached font is faster (not that it was slow but still). - Some bits and pieces have been optimized (there is room for more but I might decide not to do that). - Extra substitution features like tlig and trep are now runtime and not cached. - Processing in node mode can be somewhat faster for complex fonts. - The generic font code will stay as it is for at least a while after the new code has become stable and the current method will stay around too.
Of course there will be bugs although the test suite runs without crashing. I will use the new code on my machine but you can test it with:
\usemodule[newotf]
before \starttext (or in cont-loc.mkiv).
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
___________________________________________________________________________________
Hello, \pushbackground seems to be broken in the last beta - this doesn't compile (but it did till now): ---- \defineheadalternative [PartAlt] [renderingsetup=set:PartPage] \startsetups[set:PartPage] \startmakeup[mu:PartPage] \white \headnumbercontent \blank[2*big] \headtextcontent \stopmakeup \stopsetups \definemakeup [mu:PartPage] [align=middle, top=\vfill\vfill, bottom=\vfill\vfill\vfill, ] \definefont[PartText][SerifBold sa 5] % Method 1: change the values of the predefined "default" conversion set, % you can use name of the sectionblock as prefix (separated by a :) to set % the values only for a certain part (e.g. the appendix) of your document \defineconversionset[appendix:default][A,R][n] % Method 2: Create your own conversion set and apply it to all sections % % \defineconversionset[bodypart:myconversion][n,n][n] % \defineconversionset[appendix:myconversion][A,R][n] % \setuphead[part,chapter,section][sectionconversionset=myconversion] \setuphead [part] [placehead=yes, alternative=PartAlt, page=right, header=none, before={\pushbackground[page] \setupbackgrounds[page][background=color,backgroundcolor=black]}, after={\page\popbackground}, bodypartlabel=MyPart:body, appendixlabel=MyPart:appx, align=middle, numberstyle=\bfc, textstyle=PartText, ] \setuplabeltext[en][MyPart:body=Díl ,MyPart:appx=Dodatek ] \starttext \startbodymatter \part{My First Part} \input knuth \stopbodymatter \startappendices \part{My First Appendix} \input tufte \stopappendices \stoptext ---- Lukas -- Ing. Lukáš Procházka | mailto:LPr@pontex.cz Pontex s. r. o. | mailto:pontex@pontex.cz | http://www.pontex.cz Bezová 1658 147 14 Praha 4 Tel: +420 241 096 751 Fax: +420 244 461 038
On 7/12/2015 12:22 AM, Lukáš Procházka wrote:
Hello,
\pushbackground seems to be broken in the last beta - this doesn't compile (but it did till now):
works ok here ... also, that code hasn't changed ----------------------------------------------------------------- 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 -----------------------------------------------------------------
participants (6)
-
Dominik Gerstorfer
-
Hans Hagen
-
Lukáš Procházka
-
Pablo Rodriguez
-
Thomas A. Schmitz
-
Wolfgang Schuster