Re: [NTG-context] composing characters in MKIV
On 30-9-2010 11:14, Mojca Miklavec wrote: as well as \addff{compose}, but it had zero effect since I used that \addff only works for opentype (unless I make a pseudo feature which is a lot of work for something that is never dynamic) However compose=yes creates an unacceptable uppercase Č, at least in Lucida, much worse than what TeX does (and already TeX does it badly). I've sent you a test file. A problem is that the boundingbox of an accent is rather unpredictable and I might need to write a more clever function for it. So we need more tests with different fonts ... (we can best do that off-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 - ___ 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] composing characters in MKIV
On Thu, Sep 30, 2010 at 22:14, Hans Hagen wrote: > > \starttext > > \definefontfeature[default][default][compose=yes] > > \setupbodyfont[lucida] Oh, I have tried that; actually I did \definefontfeature[default][liga=yes,kern=yes,tlig=yes,compose=yes] as well as \addff{compose}, but it had zero effect since I used that *after* \setupbodyfont instead of using it before. This was a bit weird since features for OpenType fonts can be switched on and off at any given time and I didn't realize that order was important. > \startTEXpage > mojča MOJČA > \stopTEXpage > > \stoptext > > ok, positioning could be improved I guess but so far no one bothered about > this feature (I started fixing vf fonts of Lucida for pdfTeX, but I'm not sure how to proceed; and now it may not be needed any more.) There are two problems. Even \buildtextaccent creates an ugly č and that dates back to Knuth's TeX (TeX assumes that every letter is symetric which holds for just about any letter but c). But I agree that this is highly esoteric request. However compose=yes creates an unacceptable uppercase Č, at least in Lucida, much worse than what TeX does (and already TeX does it badly). Mojca ___ 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] composing characters in MKIV
On 30-9-2010 8:31, Mojca Miklavec wrote: \defč{\buildtextaccent\textcaron c} \defČ{\buildtextaccent\textcaron C} \starttext \definefontfeature[default][default][compose=yes] \setupbodyfont[lucida] \startTEXpage mojča MOJČA \stopTEXpage \stoptext ok, positioning could be improved I guess but so far no one bothered about this feature - 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 ___
[NTG-context] composing characters in MKIV
Dear Hans (or anyone else), There are some fonts (including Lucida) that don't have all the needed character. A font feature "compose=yes" has been added to MKIV, but that one doesn't work for Lucida or any other Type1 font. My current fallback is to use: % this doesn't help % \definefontfeature % [compose] % [liga=yes,kern=yes,tlig=yes,compose=yes] \beginNEWTEX \catcode`č=\active \catcode`Č=\active \defč{\buildtextaccent\textcaron c} \defČ{\buildtextaccent\textcaron C} \endNEWTEX But nevertheless a few questions: - Is there some "accessible" method to compose a few characters in the font (not too low-level) as opposed to using active characters? The code must be there already since this is supposed to work for OpenType fonts. - Is there any way to fix horizontal and vertical position of accents (on glyph-per-glyph basis; that one probably needs to be slightly more low-level; maybe using lfg files)? - Do lfg files work for non-opentype (Type1) fonts? Thanks a lot, Mojca ___ 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 ___