New module - mkiv font loading
Hi all, I wrote a new module to load fonts without the need to write typescripts for them -> http://bitbucket.org/wolfs/simplefonts/ Wolfgang
Hi Wolfgang:
nice script.
Can the module meet my needs discussed in
http://www.ntg.nl/pipermail/ntg-context/2009/040831.html ?
or is it possible to extend the support to xetex?
Yue Wang
On Mon, May 11, 2009 at 8:23 PM, Wolfgang Schuster
Hi all,
I wrote a new module to load fonts without the need to write typescripts for them -> http://bitbucket.org/wolfs/simplefonts/
Wolfgang
___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
Am 11.05.2009 um 14:41 schrieb Yue Wang:
Hi Wolfgang:
nice script.
Can the module meet my needs discussed in http://www.ntg.nl/pipermail/ntg-context/2009/040831.html ?
dunno, i have to see more from your code
or is it possible to extend the support to xetex?
possible yes but it's a lot of work because the complete fallback mechanism needs to be written for XeTeX which is available for MkIV since a while. Wolfgang
On Mon, May 11, 2009 at 9:00 PM, Wolfgang Schuster
Am 11.05.2009 um 14:41 schrieb Yue Wang:
Hi Wolfgang:
nice script.
Can the module meet my needs discussed in http://www.ntg.nl/pipermail/ntg-context/2009/040831.html ?
dunno, i have to see more from your code
The code is already in http://code.google.com/p/ctex-kit/ It's located in /trunk/zhspacing/ directory. Thanks for reviewing. The key idea is to group chinese words in {\zhfonts } automatically using XeTeX's interchartok mechanism. In LaTeX, It saves the current latin nfss style state in a macro, then apply to the zhfonts group. related code is in zhspacing/tex/latex/zhfont.sty. But I don't know how to do that in ConTeXt.
or is it possible to extend the support to xetex?
possible yes but it's a lot of work because the complete fallback mechanism needs to be written for XeTeX which is available for MkIV since a while.
Wolfgang
___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
Wolfgang Schuster wrote:
possible yes but it's a lot of work because the complete fallback mechanism needs to be written for XeTeX which is available for MkIV since a while.
this is unlikely to happen (unless we add lots of optional code to mkii to deal with xetex which then probably results in a lot of other code hooked into other mechanisms as well) as mkii is kind of frozen if we have to port all sophisticated (upcoming) mkiv features back to mkiv we might wonder why we started with mkiv in the first place; the whole idea is to have less (complex) code Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Mon, May 11, 2009 at 9:48 PM, Hans Hagen
Wolfgang Schuster wrote:
possible yes but it's a lot of work because the complete fallback mechanism needs to be written for XeTeX which is available for MkIV since a while.
this is unlikely to happen (unless we add lots of optional code to mkii to deal with xetex which then probably results in a lot of other code hooked into other mechanisms as well) as mkii is kind of frozen
if we have to port all sophisticated (upcoming) mkiv features back to mkiv we might wonder why we started with mkiv in the first place; the whole idea is to have less (complex) code
not like that complicated (we do not need font fallback). it is only something about: save the current font style (like \ss, \it ,10pt) to a macro . then apply the macro to a group. for example aa { \anotherfont bb} we should save the style for aa when \anotherfont is called, and apply that style to bb. that should be enough. but we don't know how to get the font style.
Hans
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
Yue Wang wrote:
On Mon, May 11, 2009 at 9:48 PM, Hans Hagen
wrote: Wolfgang Schuster wrote:
possible yes but it's a lot of work because the complete fallback mechanism needs to be written for XeTeX which is available for MkIV since a while. this is unlikely to happen (unless we add lots of optional code to mkii to deal with xetex which then probably results in a lot of other code hooked into other mechanisms as well) as mkii is kind of frozen
if we have to port all sophisticated (upcoming) mkiv features back to mkiv we might wonder why we started with mkiv in the first place; the whole idea is to have less (complex) code
not like that complicated (we do not need font fallback).
it is only something about:
save the current font style (like \ss, \it ,10pt) to a macro . then apply the macro to a group. for example
aa { \anotherfont bb} we should save the style for aa when \anotherfont is called, and apply that style to bb.
that should be enough. but we don't know how to get the font style.
see \pushcurrentfont ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Mon, May 11, 2009 at 10:33 PM, Hans Hagen
Yue Wang wrote:
On Mon, May 11, 2009 at 9:48 PM, Hans Hagen
wrote: Wolfgang Schuster wrote:
possible yes but it's a lot of work because the complete fallback mechanism needs to be written for XeTeX which is available for MkIV since a while.
this is unlikely to happen (unless we add lots of optional code to mkii to deal with xetex which then probably results in a lot of other code hooked into other mechanisms as well) as mkii is kind of frozen
if we have to port all sophisticated (upcoming) mkiv features back to mkiv we might wonder why we started with mkiv in the first place; the whole idea is to have less (complex) code
not like that complicated (we do not need font fallback).
it is only something about:
save the current font style (like \ss, \it ,10pt) to a macro . then apply the macro to a group. for example
aa { \anotherfont bb} we should save the style for aa when \anotherfont is called, and apply that style to bb.
that should be enough. but we don't know how to get the font style.
see \pushcurrentfont
Thank you, I will look into that. Many thanks:)
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
Am 11.05.2009 um 15:48 schrieb Hans Hagen:
Wolfgang Schuster wrote:
possible yes but it's a lot of work because the complete fallback mechanism needs to be written for XeTeX which is available for MkIV since a while.
this is unlikely to happen (unless we add lots of optional code to mkii to deal with xetex which then probably results in a lot of other code hooked into other mechanisms as well) as mkii is kind of frozen
Sorry Hans but my answer above has nothing to do with your code, I provided in my module a mechanism to set fonts in a similar way as the fontspec and xeCJK/zhspacing packages for LaTeX provide but *I* won't add extra code to use my module with XeTeX. Wolfgang
Am 11.05.2009 um 14:41 schrieb Yue Wang:
Hi Wolfgang:
nice script.
Can the module meet my needs discussed in http://www.ntg.nl/pipermail/ntg-context/2009/040831.html ? or is it possible to extend the support to xetex?
When you take care about font switching in your module it's easy, large part of the code can be left out because XeTeX can find the regular/italic/... styles itself. \unprotect \def\setmainfont[#1]{\definetypeface[simplefonts][rm][Xserif][#1] [default]} \def\setsansfont[#1]{\definetypeface[simplefonts][ss][Xsans] [#1] [default]} \def\setmonofont[#1]{\definetypeface[simplefonts][tt][Xmono] [#1] [default]} \appendtoks\setupbodyfont[simplefonts]\to\everystarttext \protect \setmainfont[Times New Roman] \setsansfont[Arial] \setmonofont[Courier New] \starttext \rm\tf roman \it italic \bf bold \bi bolditalic \ss\tf roman \it italic \bf bold \bi bolditalic \tt\tf roman \it italic \bf bold \bi bolditalic \stoptext Wolfgang
great! thanks Wolfgang. is this working with the latest minimals? Hopefully I'll get to try it later. Wolfgang Schuster wrote:
Hi all,
I wrote a new module to load fonts without the need to write typescripts for them -> http://bitbucket.org/wolfs/simplefonts/
Wolfgang
___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
I got a chance to try it out; it's great. What I don't understand is that I need to use \starttext ... \stoptext, normally omitting these work. In your module's case I have to use it or it just typesets with L. Modern. \startcomponent first \product project \environment my.env \starttext % I don't normally use this ... \stoptext \stopcomponent Wolfgang Schuster wrote:
Hi all,
I wrote a new module to load fonts without the need to write typescripts for them -> http://bitbucket.org/wolfs/simplefonts/
Wolfgang
___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
Am 15.05.2009 um 21:36 schrieb Mohamed Bana:
I got a chance to try it out; it's great.
What I don't understand is that I need to use \starttext ... \stoptext, normally omitting these work. In your module's case I have to use it or it just typesets with L. Modern.
\startcomponent first \product project \environment my.env
\starttext % I don't normally use this ... \stoptext \stopcomponent
You don't need \starttext/\stoptext in your document, it would haven been enough to load the module and set the fonts before \startcomponent (have you noticed it works when you compile the project?) but this was expected and I fixed it. Wolfgang
Hi Wolfgang, Sorry to hassle you again, but I have a quick question. I'm using Creator: ConTeXt - 2008.10.31 13:58 Producer: luaTeX-0.30.3 as a few things don't work with a recent release, and I get the following errors; ! Undefined control sequence. l.50 \setinterfacemessage {simplefonts}{title}{simplefonts} ? ! Undefined control sequence. l.51 \setinterfacemessage {simplefonts}{1} {font -- not found} ? Are they important? If not I'll simply ignore them with --batchmode. Wolfgang Schuster wrote:
Hi all,
I wrote a new module to load fonts without the need to write typescripts for them -> http://bitbucket.org/wolfs/simplefonts/
Wolfgang
___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
Mohamed Bana wrote:
Creator: ConTeXt - 2008.10.31 13:58
way too old for this ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
You can comment the lines 56–59 and the message will disappear. I expect from users who want to use mkiv to have always a recent context version on their system, in mkii i try to be compatible with older versions but this is not always possible. Wolfgang Am 16.05.2009 um 18:23 schrieb Mohamed Bana:
Hi Wolfgang,
Sorry to hassle you again, but I have a quick question. I'm using
Creator: ConTeXt - 2008.10.31 13:58 Producer: luaTeX-0.30.3
as a few things don't work with a recent release, and I get the following errors;
! Undefined control sequence. l.50 \setinterfacemessage {simplefonts}{title}{simplefonts} ? ! Undefined control sequence. l.51 \setinterfacemessage {simplefonts}{1} {font -- not found} ?
Are they important? If not I'll simply ignore them with --batchmode.
participants (5)
-
Hans Hagen
-
Mohamed Bana
-
Wolfgang Schuster
-
Yanrui Li
-
Yue Wang