ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Cc: alkauffm@rz.uni-potsdam.de, ntg-context@ntg.nl
Subject: Re: cm-fonts and german umlauts
Date: Thu, 21 Sep 2000 08:40:32 +0200	[thread overview]
Message-ID: <3.0.6.32.20000921084032.008aa560@pop.wxs.nl> (raw)
In-Reply-To: <39C8E861.2792208D@gmx.de>

At 06:40 PM 9/20/00 +0200, Tobias Burnus wrote:
>Hallo Albrecht, hallo Hans, hi all,
>
>> I am typesetting german texts using ConTeXt with the option
>> \useencoding[win] and cmr-fonts (\setupbodyfont [cmr]). There is a problem
>> with the hypenation after a german umlaut ä,ö or ü, because of the
>> 7-bit-encoding of the cmr-font.
>> In LaTeX the package ae.sty provides cm-fonts as 8-bit-encoded. Has
>> ConTeXt an analogous solution?
>Well the ae trick isnot really done by LaTeX, but by creating a virtual
>font AE
>(T1 encoded).
>
>AE styles does two things:
>a) Using the virtual font [ae.sty]
>b) (extended version) using EC for characters which are not in CM
>   (this results in bitmaps in the PS/PDF files if you haven't bought
>    the EC Type 1 fonts) [aecompl.sty]
>
>I think this hasn't be done yet, but (a) seems "rather" trival.
>
>Being not an expert on fonts in ConTeXt this should work:
>\definefontsynonym [ComputerModern] [aer10] [encoding=ec]

\definefontsynonym[cmr10][aer10][encoding=ec]
\definefontsynonym[cmr12][aer12][encoding=ec]
etc 

>(b) seems might be a little bit more complicated since you need to
>support 13 extra characters.
>
>
>(Hans: looking at enco-ec.tex I miss:

we can add those (in the context way). 

If someone wants to test the attached file ... seems to work here, that is,
when you add the following to cont-new.tex (apter \unprotect: 

\def\resetfontdefinitionfile[#1]%
  {\letbeundefined{\c!file\f!fontprefix#1}}

I tested it with: 

% output=pdftex

\setupbodyfont[aer] \useencoding[ec]

\starttext

\nl \bf \hyphenatedword{doordefini\"eren}

\stoptext

Technically it comes down to: 

- remapping font files
- making context forget that cmr is defined 
- reload the cmr font definition 

so, it's not that complicated. 

If you want to default to this font: 

  texexec  --make  --bodyfont=aer  de 

should do the job

Hans

======================= font-aer.tex =======================

%D \module
%D   [       file=font-aer,
%D        version=2000.09.20,
%D          title=\CONTEXT\ Font Macros,
%D       subtitle=Computer Modern,
%D         author=Hans Hagen,
%D           date=\currentdate,
%D      copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for 
%C details. 

%D This file remaps the default Computer Modern Font Files 
%D onto the virtual EC ones, so that hyphenations work well.

\resetfontdefinitionfile[cmr]

\definefontsynonym [cmb10]       [aeb10]      [encoding=ec]
\definefontsynonym [cmcsc10]     [aecsc10]    [encoding=ec]
\definefontsynonym [cmsl10]      [aesl10]     [encoding=ec]
\definefontsynonym [cmssbx10]    [aessbx10]   [encoding=ec] 
\definefontsynonym [cmti7]       [aeti7]      [encoding=ec] 
\definefontsynonym [cmbx10]      [aebx10]     [encoding=ec] 
\definefontsynonym [cmitt10]     [aeitt10]    [encoding=ec] 
\definefontsynonym [cmsl12]      [aesl12]     [encoding=ec] 
\definefontsynonym [cmssdc10]    [aessdc10]   [encoding=ec] 
\definefontsynonym [cmti8]       [aeti8]      [encoding=ec] 
\definefontsynonym [cmbx12]      [aebx12]     [encoding=ec] 
\definefontsynonym [cmr10]       [aer10]      [encoding=ec] 
\definefontsynonym [cmsl8]       [aesl8]      [encoding=ec] 
\definefontsynonym [cmssi10]     [aessi10]    [encoding=ec] 
\definefontsynonym [cmti9]       [aeti9]      [encoding=ec] 
\definefontsynonym [cmbx5]       [aebx5]      [encoding=ec] 
\definefontsynonym [cmr12]       [aer12]      [encoding=ec] 
\definefontsynonym [cmsl9]       [aesl9]      [encoding=ec] 
\definefontsynonym [cmssi12]     [aessi12]    [encoding=ec] 
\definefontsynonym [cmtt10]      [aett10]     [encoding=ec] 
\definefontsynonym [cmbx6]       [aebx6]      [encoding=ec] 
\definefontsynonym [cmr17]       [aer17]      [encoding=ec] 
\definefontsynonym [cmsltt10]    [aesltt10]   [encoding=ec] 
\definefontsynonym [cmssi17]     [aessi17]    [encoding=ec] 
\definefontsynonym [cmtt12]      [aett12]     [encoding=ec] 
\definefontsynonym [cmbx7]       [aebx7]      [encoding=ec] 
\definefontsynonym [cmr5]        [aer5]       [encoding=ec] 
\definefontsynonym [cmss10]      [aess10]     [encoding=ec] 
\definefontsynonym [cmssi8]      [aessi8]     [encoding=ec] 
\definefontsynonym [cmtt8]       [aett8]      [encoding=ec] 
\definefontsynonym [cmbx8]       [aebx8]      [encoding=ec] 
\definefontsynonym [cmr6]        [aer6]       [encoding=ec] 
\definefontsynonym [cmss12]      [aess12]     [encoding=ec] 
\definefontsynonym [cmssi9]      [aessi9]     [encoding=ec] 
\definefontsynonym [cmtt9]       [aett9]      [encoding=ec] 
\definefontsynonym [cmbx9]       [aebx9]      [encoding=ec] 
\definefontsynonym [cmr7]        [aer7]       [encoding=ec] 
\definefontsynonym [cmss17]      [aess17]     [encoding=ec] 
\definefontsynonym [cmtcsc10]    [aetcsc10]   [encoding=ec] 
\definefontsynonym [cmbxsl10]    [aebxsl10]   [encoding=ec] 
\definefontsynonym [cmr8]        [aer8]       [encoding=ec] 
\definefontsynonym [cmss8]       [aess8]      [encoding=ec] 
\definefontsynonym [cmti10]      [aeti10]     [encoding=ec] 
\definefontsynonym [cmbxti10]    [aebxti10]   [encoding=ec] 
\definefontsynonym [cmr9]        [aer9]       [encoding=ec] 
\definefontsynonym [cmss9]       [aess9]      [encoding=ec] 
\definefontsynonym [cmti12]      [aeti12]     [encoding=ec] 

\setupbodyfont[cmr]

\endinput 

-------------------------------------------------------------------------
                                                  Hans Hagen | PRAGMA ADE
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


      reply	other threads:[~2000-09-21  6:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-09-20  5:34 Albrecht Kauffmann
2000-09-20 16:40 ` Tobias Burnus
2000-09-21  6:40   ` Hans Hagen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3.0.6.32.20000921084032.008aa560@pop.wxs.nl \
    --to=pragma@wxs.nl \
    --cc=alkauffm@rz.uni-potsdam.de \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).