ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* font variants
@ 2004-11-19 14:11 Adam Lindsay
  2004-11-19 15:11 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Adam Lindsay @ 2004-11-19 14:11 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 2220 bytes --]

Hi all,

I just wanted to run this technique by you all, and get a bit of
feedback, both on the utility as well as the style of the solution.

I'm a bit unhealthily obsessed by fonts, especially with getting the most
out of the various features. Unfortunately, each vendor expresses
different features in different ways, so that leads to font-sensitive
markup. This problem explodes in the OpenType and XeTeX world, because of
the number of features each font exposes.

However, it's relevant in the pdfTeX/type1 world as well. Just last
night, I discovered the FPL fonts (SC/OsF for URW Palladio) on CTAN
(<http://www.ctan.org/tex-archive/fonts/fpl/>). How does one access the
old style figures in this font without knowing intimately about the font?

I took inspiration (and code) from the Unicode font mechanisms and the
new font effects. The code is in the attached test-psc, the typescript in
type-psc. The result is at <http://homepage.mac.com/atl/tex/test-psc.pdf>.

What this does and doesn't do:
- generalises font access to features in associated fonts
- adapts itself to current size/family/alternative
- doesn't allow further adaptation (e.g., \it \Var[osf] 123 \bf 456)
- best for short runs of associated fonts (e.g., OsF, sub/superscripts)
- can insert arbitrary features into existing typescripts
- relies on a couple special naming conventions within typescripts
- can be defined based on Serif/Sans/Mono family
- is not currently defined based on bodyfont namespace. 
     Is this more desirable with people \switchbodyfont ing in a doc?
- allows expansion beyond \tf\bf\it\bi\sl\bs\sc choices.

Any thoughts? 
(If anyone wants to give pointers on the correct usage/relevance of
[#1][#2]#3 parameters, pushfont/popfont, and adapting to bodyfont
namespaces, please feel free!)
[Hans, if you see the general utility of this kind of solution, I'd
appreciate the addition of Caps to the \fontstylesuffix.]
-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Adam T. Lindsay, Computing Dept.     atl@comp.lancs.ac.uk
 Lancaster University, InfoLab21        +44(0)1524/510.514
 Lancaster, LA1 4WA, UK             Fax:+44(0)1524/510.492
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

[-- Attachment #2.1: test-psc.tex --]
[-- Type: application/x-tex, Size: 1398 bytes --]

[-- Attachment #2.2: type-psc.tex --]
[-- Type: application/x-tex, Size: 991 bytes --]

[-- Attachment #3: Type: text/plain, Size: 139 bytes --]

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

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

* Re: font variants
  2004-11-19 14:11 font variants Adam Lindsay
@ 2004-11-19 15:11 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2004-11-19 15:11 UTC (permalink / raw)


Adam Lindsay wrote:

> However, it's relevant in the pdfTeX/type1 world as well. Just last
> night, I discovered the FPL fonts (SC/OsF for URW Palladio) on CTAN
> (<http://www.ctan.org/tex-archive/fonts/fpl/>). How does one access the
> old style figures in this font without knowing intimately about the font?

interesting, fetching them

> I took inspiration (and code) from the Unicode font mechanisms and the

getglyph uses something similar

> new font effects. The code is in the attached test-psc, the typescript in
> type-psc. The result is at <http://homepage.mac.com/atl/tex/test-psc.pdf>.

> What this does and doesn't do:
> - generalises font access to features in associated fonts
> - adapts itself to current size/family/alternative
> - doesn't allow further adaptation (e.g., \it \Var[osf] 123 \bf 456)
> - best for short runs of associated fonts (e.g., OsF, sub/superscripts)
> - can insert arbitrary features into existing typescripts

how about adding support for font classes (i'll look into it)

> - relies on a couple special naming conventions within typescripts
> - can be defined based on Serif/Sans/Mono family
> - is not currently defined based on bodyfont namespace. 

doable

>      Is this more desirable with people \switchbodyfont ing in a doc?
> - allows expansion beyond \tf\bf\it\bi\sl\bs\sc choices.

so, we need an installable fontstylesuffix (analogue to math switching, no problem)

> Any thoughts? 
> (If anyone wants to give pointers on the correct usage/relevance of
> [#1][#2]#3 parameters, pushfont/popfont, and adapting to bodyfont
> namespaces, please feel free!)

> [Hans, if you see the general utility of this kind of solution, I'd
> appreciate the addition of Caps to the \fontstylesuffix.]

ok, done

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------

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

end of thread, other threads:[~2004-11-19 15:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-19 14:11 font variants Adam Lindsay
2004-11-19 15:11 ` 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).