Re: [NTG-context] the new simplefonts stuff

2014-09-05 Thread Sandra Snan
On Thu, 4 Sep 2014 12:24:08 +0200, Wolfgang Schuster 
schuster.wolfg...@gmail.com wrote:
 
 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.
 

It just turned up as a blank page here. Weird.
So maybe it’s just that one font. Now that you’ve told me that it’s the
family name, specifically, I’ve tested with a lot of other fonts and
they have worked.

Sandra
___
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
___

Re: [NTG-context] the new simplefonts stuff

2014-09-05 Thread Sandra Snan
On Thu, 04 Sep 2014 08:53:02 -0700, Mica Semrick m...@silentumbrella.com 
wrote:
 On Debian, you can try: 
 fc-list : family
 to list the family name. I was playing with this last night on my Debian 
 Jessie system. 
 
 The colon is a wildcard operator that will match all fonts on the system. I 
 usually just grep the results for what I need.

Of all the ways to find out the family name that has been discussed in
this thread, this is one of the quickest ones. Thanks, I'll use it!

Sandra
___
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
___


Re: [NTG-context] the new simplefonts stuff

2014-09-05 Thread Keith McKay
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 sandra.s...@idiomdrottning.org:


%% 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
___


___
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
___


Re: [NTG-context] the new simplefonts stuff

2014-09-04 Thread Sandra Snan
Thank you so much for your help, guys!

On Thu, 4 Sep 2014 00:21:22 +0200, Wolfgang Schuster 
schuster.wolfg...@gmail.com wrote:
 Am 03.09.2014 um 21:40 schrieb Joshua Krämer joshua.krae...@gmail.com:
[...]
  The only name which works in ConTeXt is the family name (which can be
  seen in FontForge): Swis721 BT, note the single s.  However, this
  name is *not* shown in the mtxrun output.

Something I realized as I was messing around waiting for fontforge to
install is that, at least for fonts that come with *.afm metric files
and *.pfb files,, you can look at them for some info. Looking at
ubkl8a.afm I see:

ellen% grep Name /usr/share/fonts/type1/texlive-fonts-recommended/ubkl8a.afm
FontName URWBookmanL-Ligh
FullName URW Bookman L Light
FamilyName URW Bookman L

The same info is similarly ascii-encoded in the pfb file. But when
fontforge had installed (I needed it to look at the otf and ttf fonts in
my example) I double checked and found the same info.

 
 The family name is shown when you use the info option, e.g.
 
 mtxrun --script font --list --info --all texgyrepagella*

This was one of the first things I tried.

ellen% mtxrun --script fonts  --info --list --all 
--pattern='bookmanlligh$'|grep name
mtx-fonts   | fontname: urwbookmanlligh
mtx-fonts   | fullname: urwbookmanlligh
mtx-fonts   | filename: ubkl8a.afm

Not really any of the same names even though it finds the same file.

I don't have Macintosh but in Inkscape the name shows up as URW Bookman
L and the font works there. I have Debian.

ellen% context --version|grep version
mtx-context | current version: 2014.05.21 22:04

I guess I'm missing something that will in hindsight look obvious...

Sandra

Example follows.

% Uncomment one of the \definefontfamily lines.

%% 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
___
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
___

Re: [NTG-context] the new simplefonts stuff

2014-09-04 Thread Wolfgang Schuster

Am 04.09.2014 um 09:15 schrieb Sandra Snan sandra.s...@idiomdrottning.org:

 %% 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
___


Re: [NTG-context] the new simplefonts stuff

2014-09-04 Thread Mica Semrick
On Debian, you can try: 
fc-list : family
to list the family name. I was playing with this last night on my Debian Jessie 
system. 

The colon is a wildcard operator that will match all fonts on the system. I 
usually just grep the results for what I need.

You may want to refresh the font cache, with
fc-cache -fv

Best,
Mica

On September 4, 2014 12:15:39 AM PDT, Sandra Snan 
sandra.s...@idiomdrottning.org wrote:
Thank you so much for your help, guys!

On Thu, 4 Sep 2014 00:21:22 +0200, Wolfgang Schuster
schuster.wolfg...@gmail.com wrote:
 Am 03.09.2014 um 21:40 schrieb Joshua Krämer
joshua.krae...@gmail.com:
[...]
  The only name which works in ConTeXt is the family name (which can
be
  seen in FontForge): Swis721 BT, note the single s.  However,
this
  name is *not* shown in the mtxrun output.

Something I realized as I was messing around waiting for fontforge to
install is that, at least for fonts that come with *.afm metric files
and *.pfb files,, you can look at them for some info. Looking at
ubkl8a.afm I see:

ellen% grep Name
/usr/share/fonts/type1/texlive-fonts-recommended/ubkl8a.afm
FontName URWBookmanL-Ligh
FullName URW Bookman L Light
FamilyName URW Bookman L

The same info is similarly ascii-encoded in the pfb file. But when
fontforge had installed (I needed it to look at the otf and ttf fonts
in
my example) I double checked and found the same info.

 
 The family name is shown when you use the info option, e.g.
 
 mtxrun --script font --list --info --all texgyrepagella*

This was one of the first things I tried.

ellen% mtxrun --script fonts  --info --list --all
--pattern='bookmanlligh$'|grep name
mtx-fonts   | fontname: urwbookmanlligh
mtx-fonts   | fullname: urwbookmanlligh
mtx-fonts   | filename: ubkl8a.afm

Not really any of the same names even though it finds the same file.

I don't have Macintosh but in Inkscape the name shows up as URW Bookman
L and the font works there. I have Debian.

ellen% context --version|grep version
mtx-context | current version: 2014.05.21 22:04

I guess I'm missing something that will in hindsight look obvious...

Sandra

Example follows.

% Uncomment one of the \definefontfamily lines.

%% 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
___
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
___

___
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
___

Re: [NTG-context] the new simplefonts stuff

2014-09-03 Thread Joshua Krämer
On 2014-09-01, 21:20, Sandra Snan wrote:

 This is probably a pretty basic question, but how do I find out the
 name of the font that \definefontfamily expects in the third argument?

Hi Sandra,

the only reliable method I have found is to inspect the font with
FontForge.

Here is an example: the Swiss 721 font from Bitstream (Helvetica
digitization).

FontForge reports:

Font name:Swiss721BT-Roman
Family name:  Swis721 BT
Display name: Swiss 721 BT
Weight:   Book

mtxrun --script fonts --list --all --pattern=swiss result:

swiss721bt  swiss721btroman Swiss721.ttf
swiss721btroman swiss721btroman Swiss721.ttf

The only name which works in ConTeXt is the family name (which can be
seen in FontForge): Swis721 BT, note the single s.  However, this
name is *not* shown in the mtxrun output.

Interestingly, I have also seen mtxrun show the family name (different
from the font name) for other fonts, so I really do not know how it
makes up its output.  It is certainly not useful to find out the
name that is to be used in ConTeXt.

Kind regards,
Joshua


___
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
___


Re: [NTG-context] the new simplefonts stuff

2014-09-03 Thread Wolfgang Schuster

Am 01.09.2014 um 21:20 schrieb Sandra Snan sandra.s...@idiomdrottning.org:

 This is probably a pretty basic question, but how do I find out the name
 of the font that \definefontfamily expects in the third argument?
 
 For example,
 \definefontfamily [dejavu] [serif] [DejaVu Serif]
 works fine and sets the text in DejaVu Serif, but that’s not a name I
 can find with mtxrun –scripts font:
 
 ellen% mtxrun --script fonts  --list --all --pattern='*DejaVu*'|wc -l
 28
 ellen% mtxrun --script fonts  --info --list --all --pattern='*DejaVu*'|grep 
 -i DejaVu Serif|wc -l
 0
 
 
 
 mtxrun --script fonts --info for Deja Vu doesn't
 show that identifier anywhere. I want to find out what, for example,
 Bookman is called.
 
 \definetypeface [five] [rm] [serif] [bookman]
 works fine and sets the text in some font that sure looks a lot like
 Bookman to my eyes, but
 \definefontfamily [five] [serif] [bookman]
 doesn’t work at all and the text doesn’t show up.
 
 ellen% mtxrun --script fonts  --list --all --pattern='*bookman*'|wc -l
 5
 
 I’ve looked all over for this... even tried understanding font-sel.mkvii
 (with mediocre success).

You can take a look into the font manager of your os, attached is a screenshot 
from my system
where you can see in the second column the name of the font which does also go 
into the third
argument of the \definefontfamily command. This is also the same name which is 
shown
in the font selection menu form MS Office or OpenOffice.

 Extra thanks if there’s a way to get ligatures and protrusion to work for it.

\definefontfamily [examplefont] [rm] [TeX Gyre Pagella] 
[features={default,quality}]
\definefontfamily [examplefont] [ss] [TeX Gyre Heros]   
[features={default,quality}]
\definefontfamily [examplefont] [mm] [TeX Gyre Pagella Math]

\setupbodyfont[examplefont]

\setupalign[hanging]

\showframe[text][text]

\starttext

\input tufte

\ss\input tufte

\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
___

Re: [NTG-context] the new simplefonts stuff

2014-09-03 Thread Wolfgang Schuster

Am 03.09.2014 um 21:40 schrieb Joshua Krämer joshua.krae...@gmail.com:

 On 2014-09-01, 21:20, Sandra Snan wrote:
 
 This is probably a pretty basic question, but how do I find out the
 name of the font that \definefontfamily expects in the third argument?
 
 Hi Sandra,
 
 the only reliable method I have found is to inspect the font with
 FontForge.
 
 Here is an example: the Swiss 721 font from Bitstream (Helvetica
 digitization).
 
 FontForge reports:
 
 Font name:Swiss721BT-Roman
 Family name:  Swis721 BT
 Display name: Swiss 721 BT
 Weight:   Book
 
 mtxrun --script fonts --list --all --pattern=swiss result:
 
 swiss721bt  swiss721btroman Swiss721.ttf
 swiss721btroman swiss721btroman Swiss721.ttf
 
 The only name which works in ConTeXt is the family name (which can be
 seen in FontForge): Swis721 BT, note the single s.  However, this
 name is *not* shown in the mtxrun output.

Don’t expect logic in the internal names of a font, there is none.

 Interestingly, I have also seen mtxrun show the family name (different
 from the font name) for other fonts, so I really do not know how it
 makes up its output.  It is certainly not useful to find out the
 name that is to be used in ConTeXt.

The family name is shown when you use the info option, e.g.

mtxrun --script font --list --info --all texgyrepagella*

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
___

[NTG-context] the new simplefonts stuff

2014-09-02 Thread Sandra Snan
This is probably a pretty basic question, but how do I find out the name
of the font that \definefontfamily expects in the third argument?

For example,
\definefontfamily [dejavu] [serif] [DejaVu Serif]
 works fine and sets the text in DejaVu Serif, but that’s not a name I
 can find with mtxrun –scripts font:

ellen% mtxrun --script fonts  --list --all --pattern='*DejaVu*'|wc -l
28
ellen% mtxrun --script fonts  --info --list --all --pattern='*DejaVu*'|grep -i 
DejaVu Serif|wc -l
0



 mtxrun --script fonts --info for Deja Vu doesn't
show that identifier anywhere. I want to find out what, for example,
Bookman is called.

\definetypeface [five] [rm] [serif] [bookman]
works fine and sets the text in some font that sure looks a lot like
Bookman to my eyes, but
\definefontfamily [five] [serif] [bookman]
doesn’t work at all and the text doesn’t show up.

ellen% mtxrun --script fonts  --list --all --pattern='*bookman*'|wc -l
5

I’ve looked all over for this... even tried understanding font-sel.mkvii
(with mediocre success).
Sandra

PS
Extra thanks if there’s a way to get ligatures and protrusion to work for it.
___
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
___

Re: [NTG-context] the new simplefonts stuff

2014-09-02 Thread Pablo Rodriguez
On 09/01/2014 09:20 PM, Sandra Snan wrote:
 [...]
 PS
 Extra thanks if there’s a way to get ligatures and protrusion to work for it.

Hi Sandra,

I’m afraid I cannot help you with font names, since I use system fonts.

But standard ligatures an protrusion work with these commands:

\definefontfeature[default][default][script=latn, protrusion=quality]
\setupalign[hanging]

I hope it helps,


Pablo
-- 
http://www.ousia.tk
___
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
___