Hello, I'm working on some XSL stylesheets for translating XML documents into Context. Although I've read the document "Fonts in Context" and understood that one could use typescripts for managing fonts, in the context of my stylesheets I'd rather like to stick to the \definebodyfont command, because so far it works and I'm a bit confused about all those indirections one has to use when defining typescripts. The only thing which doesn't seem to work are font encodings. Please, take a look at the following document: %-------------------------------------------- \enableregime[il1] \mainlanguage[de] \language[de] \setupencoding[default=texnansi] \definefontsynonym[NewCenturySchoolbook][pncr8r][encoding=texnansi] \definebodyfont[4pt,5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,14.4pt,17.3pt][rm] [tf=NewCenturySchoolbook sa 1] \definefont[nctr][NewCenturySchoolbook at 10pt] \setupbodyfont[10pt] \starttext {\nctr \showcharacters} {\showcharacters} \stoptext %-------------------------------------------- Defining the font "directly" with \definefont leads to a texnansi-encoded table of characters, so that I could use the special German umlaut characters (which is my intention, of course). The definition of the font with \definebodyfont produces a default-encoded table with characters, which are *not* texnansi-encoded, because all the umlaut characters are missing. At least using Windows XP, TexLive 2004 distribution (MikTeX). I don't understand why this happens for two reasons: 1. Both commands (\definebodyfont and \definefont) use the same synonym for the font, with an explicitely defined texnansi-encoding. 2. The default encoding of the whole document was set to texnansi. It is getting even more disturbing when I'm setting the body font size to 12pt. (Using the command \setupbodyfont[12pt]). Then both tables are showing a texnansi-encoded font. What has font size to do with encodings? Since I don't want to use a body font size of 12pt in all of my documents, only to be able to use German umlaut characters, any hints to what I'm doing wrong here would be appreciated very much. Thanks in advance, Stefan Ohletz
Hi Stefan, I do not claim to understand all of it, but I can help you a bit: Stefan Ohletz wrote:
\definefontsynonym[NewCenturySchoolbook][pncr8r][encoding=texnansi]
This line is wrong. pncr8r is not texnansi, but '8r', an internal encoding that is not intended to be used directly. In a standard installation, there is no texnansi-encoded version of NCS, so it would probably be easier to use \definefontsynonym[NewCenturySchoolbook][pncr8t][encoding=ec] Greetings, Taco
participants (2)
-
Stefan Ohletz
-
Taco Hoekwater