ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: the new simplefonts stuff
       [not found] <87wq9jrh44.fsf@ellen.idiomdrottning.org>
@ 2014-09-04 15:53 ` Mica Semrick
  2014-09-05  6:22   ` Sandra Snan
       [not found] ` <5D145AD1-28A8-491E-8601-DE1369F3E663@gmail.com>
  1 sibling, 1 reply; 9+ messages in thread
From: Mica Semrick @ 2014-09-04 15:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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.snan@idiomdrottning.org> wrote:
>Thank you so much for your help, guys!
>
>On Thu, 4 Sep 2014 00:21:22 +0200, Wolfgang Schuster
><schuster.wolfgang@gmail.com> wrote:
>> Am 03.09.2014 um 21:40 schrieb Joshua Krämer
><joshua.kraemer@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
___________________________________________________________________________________

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

* Re: the new simplefonts stuff
       [not found] ` <5D145AD1-28A8-491E-8601-DE1369F3E663@gmail.com>
@ 2014-09-05  6:20   ` Sandra Snan
  2014-09-05 10:19   ` Keith McKay
  1 sibling, 0 replies; 9+ messages in thread
From: Sandra Snan @ 2014-09-05  6:20 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Thu, 4 Sep 2014 12:24:08 +0200, Wolfgang Schuster <schuster.wolfgang@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
___________________________________________________________________________________

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

* Re: the new simplefonts stuff
  2014-09-04 15:53 ` the new simplefonts stuff Mica Semrick
@ 2014-09-05  6:22   ` Sandra Snan
  0 siblings, 0 replies; 9+ messages in thread
From: Sandra Snan @ 2014-09-05  6:22 UTC (permalink / raw)
  To: Mica Semrick, mailing list for ConTeXt users

On Thu, 04 Sep 2014 08:53:02 -0700, Mica Semrick <mica@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
___________________________________________________________________________________


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

* Re: the new simplefonts stuff
       [not found] ` <5D145AD1-28A8-491E-8601-DE1369F3E663@gmail.com>
  2014-09-05  6:20   ` Sandra Snan
@ 2014-09-05 10:19   ` Keith McKay
  1 sibling, 0 replies; 9+ messages in thread
From: Keith McKay @ 2014-09-05 10:19 UTC (permalink / raw)
  To: ntg-context

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.snan@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
___________________________________________________________________________________


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

* Re: the new simplefonts stuff
  2014-09-03 19:40 ` Joshua Krämer
@ 2014-09-03 22:21   ` Wolfgang Schuster
  0 siblings, 0 replies; 9+ messages in thread
From: Wolfgang Schuster @ 2014-09-03 22:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1480 bytes --]


Am 03.09.2014 um 21:40 schrieb Joshua Krämer <joshua.kraemer@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

[-- Attachment #1.2: Type: text/html, Size: 2498 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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] 9+ messages in thread

* Re: the new simplefonts stuff
  2014-09-01 19:20 Sandra Snan
  2014-09-02 14:16 ` Pablo Rodriguez
  2014-09-03 19:40 ` Joshua Krämer
@ 2014-09-03 20:51 ` Wolfgang Schuster
  2 siblings, 0 replies; 9+ messages in thread
From: Wolfgang Schuster @ 2014-09-03 20:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2013 bytes --]


Am 01.09.2014 um 21:20 schrieb Sandra Snan <sandra.snan@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

[-- Attachment #1.2.1: Type: text/html, Size: 2890 bytes --]

[-- Attachment #1.2.2: schriftsammlung.gif --]
[-- Type: image/gif, Size: 62512 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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] 9+ messages in thread

* Re: the new simplefonts stuff
  2014-09-01 19:20 Sandra Snan
  2014-09-02 14:16 ` Pablo Rodriguez
@ 2014-09-03 19:40 ` Joshua Krämer
  2014-09-03 22:21   ` Wolfgang Schuster
  2014-09-03 20:51 ` Wolfgang Schuster
  2 siblings, 1 reply; 9+ messages in thread
From: Joshua Krämer @ 2014-09-03 19:40 UTC (permalink / raw)
  To: ntg-context-wvrSQK3plZs

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-wvrSQK3plZs@public.gmane.org / 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] 9+ messages in thread

* Re: the new simplefonts stuff
  2014-09-01 19:20 Sandra Snan
@ 2014-09-02 14:16 ` Pablo Rodriguez
  2014-09-03 19:40 ` Joshua Krämer
  2014-09-03 20:51 ` Wolfgang Schuster
  2 siblings, 0 replies; 9+ messages in thread
From: Pablo Rodriguez @ 2014-09-02 14:16 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________

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

* the new simplefonts stuff
@ 2014-09-01 19:20 Sandra Snan
  2014-09-02 14:16 ` Pablo Rodriguez
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Sandra Snan @ 2014-09-01 19:20 UTC (permalink / raw)
  To: ntg-context

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
___________________________________________________________________________________

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

end of thread, other threads:[~2014-09-05 10:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <87wq9jrh44.fsf@ellen.idiomdrottning.org>
2014-09-04 15:53 ` the new simplefonts stuff Mica Semrick
2014-09-05  6:22   ` Sandra Snan
     [not found] ` <5D145AD1-28A8-491E-8601-DE1369F3E663@gmail.com>
2014-09-05  6:20   ` Sandra Snan
2014-09-05 10:19   ` Keith McKay
2014-09-01 19:20 Sandra Snan
2014-09-02 14:16 ` Pablo Rodriguez
2014-09-03 19:40 ` Joshua Krämer
2014-09-03 22:21   ` Wolfgang Schuster
2014-09-03 20:51 ` Wolfgang Schuster

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