Wolfgang's wee bit of code is brilliant for finding out the details of font names. The icing on the cake would be if it printed the details in its own font so we could see what it looked like. But in any case a useful bit of code. Thanks Wolfgang. Best Wishes Keith McKay On 04/09/2014 11:24, Wolfgang Schuster wrote:
Am 04.09.2014 um 09:15 schrieb Sandra Snan
: %% Just as a test for \definefontfamily, which works, text shows up in %% DejaVu Serif which is a ttf font. % \definefontfamily [five] [serif] [DejaVu Serif]
%% This is what fontforge reports as the family name for %% Baskervaldx-Reg. It works for me, text shows up in Baskervaldx, which %% is an otf font. % \definefontfamily [five] [serif] [Baskervaldx]
%% Fontforge called this the ``name for humans'', it didn't fly, text didn't show up: % \definefontfamily [five] [serif] [Baskervaldx Regular]
%% This is straight out of the manual, works, text shows up bookman. %% Wanted this look, but with \definefontfamily. % \definetypeface [five] [rm] [serif] [bookman]
%% None of these worked. Text doesn't show up at all. % \definefontfamily [five] [rm] [URW Bookman L Light] % \definefontfamily [five] [rm] [urwbookmanlligh] % \definefontfamily [five] [rm] [URWBookmanL-Ligh] % \definefontfamily [five] [rm] [URW Bookman L]
\setupbodyfont [five] \starttext Hello, snow! Won't you go, and return in december? \stoptext Below is a short example which shows the different names in a font, as you can see in the output the names in each font are different except from the familyname entry which is the same for all.
\definefontfamily [five] [rm] [URW Bookman L]
\setupbodyfont [five]
\starttext
\dolookupfontbyspec{fontname=urwbookman*}
\dorecurse{\dolookupnoffound} {\starttabulate[|l|l|] \NC Familyname \EQ \dolookupgetkeyofindex{familyname}{#1} \NC\NR \NC Fontname \EQ \dolookupgetkeyofindex{fontname}{#1} \NC\NR \NC Fullname \EQ \dolookupgetkeyofindex{fullname}{#1} \NC\NR \NC Filename \EQ \dolookupgetkeyofindex{filename}{#1} \NC\NR \NC Rawname \EQ \dolookupgetkeyofindex{rawname}{#1} \NC\NR \stoptabulate \page}
\stoptext
Wolfgang
___________________________________________________________________________________ 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 ___________________________________________________________________________________