ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* composing characters in MKIV
@ 2010-09-30 18:31 Mojca Miklavec
  2010-09-30 20:14 ` Hans Hagen
  0 siblings, 1 reply; 4+ messages in thread
From: Mojca Miklavec @ 2010-09-30 18:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________

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

* Re: composing characters in MKIV
  2010-09-30 18:31 composing characters in MKIV Mojca Miklavec
@ 2010-09-30 20:14 ` Hans Hagen
  2010-09-30 21:14   ` Mojca Miklavec
  0 siblings, 1 reply; 4+ messages in thread
From: Hans Hagen @ 2010-09-30 20:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Mojca Miklavec

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
___________________________________________________________________________________

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

* Re: composing characters in MKIV
  2010-09-30 20:14 ` Hans Hagen
@ 2010-09-30 21:14   ` Mojca Miklavec
  2010-09-30 21:21     ` Hans Hagen
  0 siblings, 1 reply; 4+ messages in thread
From: Mojca Miklavec @ 2010-09-30 21:14 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users

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
___________________________________________________________________________________

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

* Re: composing characters in MKIV
  2010-09-30 21:14   ` Mojca Miklavec
@ 2010-09-30 21:21     ` Hans Hagen
  0 siblings, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2010-09-30 21:21 UTC (permalink / raw)
  To: Mojca Miklavec; +Cc: mailing list for ConTeXt users

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
___________________________________________________________________________________

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

end of thread, other threads:[~2010-09-30 21:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-30 18:31 composing characters in MKIV Mojca Miklavec
2010-09-30 20:14 ` Hans Hagen
2010-09-30 21:14   ` Mojca Miklavec
2010-09-30 21:21     ` Hans Hagen

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).