ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Problems with font encodings
@ 2005-02-12 15:15 Stefan Ohletz
  2005-02-21  9:29 ` Taco Hoekwater
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Ohletz @ 2005-02-12 15:15 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Problems with font encodings
  2005-02-12 15:15 Problems with font encodings Stefan Ohletz
@ 2005-02-21  9:29 ` Taco Hoekwater
  0 siblings, 0 replies; 2+ messages in thread
From: Taco Hoekwater @ 2005-02-21  9:29 UTC (permalink / raw)



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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-02-21  9:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-12 15:15 Problems with font encodings Stefan Ohletz
2005-02-21  9:29 ` Taco Hoekwater

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).