ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Most portable font name
@ 2012-05-17 14:11 Philipp Gesang
  2012-05-17 22:00 ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Philipp Gesang @ 2012-05-17 14:11 UTC (permalink / raw)
  To: ConTeXt ML


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

Hi all,

tl;dr: by which name to refer to a font.

I was about to recommend (tomorrow; context: an introductory
LaTeX course) *the* way of referring to a font by its name. As we
all know, the same font (as in file) usually comes with a variety
of possible denominations. “otfinfo -i” on a *file name* results
in a list of *full name*, *Postscript name*, *unique id*, etc.,
which all might have some valid purpose. I have come across
answers to assignments that made me wonder “How on earth did E
get that to work on Eir system?”.  There’s some background info
[1] on the Fontforge pages but it doesn’t really answer my
question:

  Which identifier is least likely to break things and at the
  same time most portable between both frontends (Fontspec,
  Simplefonts, typescripts) and platforms (Win/Linux/Mac)?

For some time now I myself settled for the Postscript name as it
never caused problems in typescripts and it’s got no spaces. The
filename might be the most explicit one, but oftentimes contains
spaces which I *always* replace with underscores prior to
installing a font; also case insensitive filesystems might cause
trouble. Also, some fonts have weird file naming schemes (e.g.
CMU and the Paratype fonts), so extra comments may be required to
support legibility of the resulting code. The typescripts that
come with Context use both (“name:” and “file:”) but I have no
clue why exactly which method was chosen over the other in what
case.  The fontspec documentation (and the Simplefonts module and
our course so far) conforms to the WYSIWYG tradition of
purportedly more human-readable, spaced identifiers, e.g. “TeX
Gyre Bonum Bold”. (Cf. [1]: “FullName is designed to be read by
humans”.)

So I judged that my preferred choice might not be as good as I
think. I got cold feet and am about to remove the slide where I
recommend the PS name (I can do that later anyways). Is there --
apart from personal opinions -- some valid reason to prefer one
name over the other *in general*?

Thanks for any advice and opinions.

Philipp

[1] http://fontforge.sourceforge.net/fontinfo.html#Names


[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 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] 6+ messages in thread

* Re: Most portable font name
  2012-05-17 14:11 Most portable font name Philipp Gesang
@ 2012-05-17 22:00 ` Hans Hagen
  2012-05-17 22:16   ` Bill Meahan
  2012-05-18  6:20   ` Philipp Gesang
  0 siblings, 2 replies; 6+ messages in thread
From: Hans Hagen @ 2012-05-17 22:00 UTC (permalink / raw)
  To: ConTeXt ML

On 17-5-2012 16:11, Philipp Gesang wrote:

> So I judged that my preferred choice might not be as good as I
> think. I got cold feet and am about to remove the slide where I
> recommend the PS name (I can do that later anyways). Is there --
> apart from personal opinions -- some valid reason to prefer one
> name over the other *in general*?

For a project that has to run for a long time, I prefer filenames 
(file:). When fonts are stable names can be used too and the name 
resolved will check several names in the font. Spaces are ignored and 
names are lowercases. There's also some fallback name construction going 
on. Anyhow, the biggest problem is with fonts that have the same names 
(but different files). You can get some info when you run

mtxrun --script font --all --list pal

which shows all fonts with pal in the name(s)

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

* Re: Most portable font name
  2012-05-17 22:00 ` Hans Hagen
@ 2012-05-17 22:16   ` Bill Meahan
  2012-05-17 22:22     ` Hans Hagen
  2012-05-18  6:20   ` Philipp Gesang
  1 sibling, 1 reply; 6+ messages in thread
From: Bill Meahan @ 2012-05-17 22:16 UTC (permalink / raw)
  To: ntg-context

It *appears* things like hyphens and underscores are also ignored in 
addition to ignoring spaces. Is that correct?

When I do :

[wwm@Linden]$ mtxrun  --script fonts --list --info --all pattern=MyFont*


  and compare against some existing typescripts I see the filename in 
the typescript is something like:      file:myfontname whereas the 
system filename is /path/to/font/My_Font-Name.otf

ksh93 on FreeBSD 9.0-i386 + texlive 2011

Bill Meahan K8QN

"I want to live other lives. I've never quite believed that
one chance is all I get. Writing is my way of making
other chances."
    --  Anne Tyler



On 05/17/2012 18:00, Hans Hagen wrote:
>
> For a project that has to run for a long time, I prefer filenames 
> (file:). When fonts are stable names can be used too and the name 
> resolved will check several names in the font. Spaces are ignored and 
> names are lowercases.
>
___________________________________________________________________________________
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] 6+ messages in thread

* Re: Most portable font name
  2012-05-17 22:16   ` Bill Meahan
@ 2012-05-17 22:22     ` Hans Hagen
  0 siblings, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2012-05-17 22:22 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 18-5-2012 00:16, Bill Meahan wrote:
> It *appears* things like hyphens and underscores are also ignored in
> addition to ignoring spaces. Is that correct?

indeed

> typescript is something like: file:myfontname whereas the system
> filename is /path/to/font/My_Font-Name.otf

indeed

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

* Re: Most portable font name
  2012-05-17 22:00 ` Hans Hagen
  2012-05-17 22:16   ` Bill Meahan
@ 2012-05-18  6:20   ` Philipp Gesang
  2012-05-18  9:40     ` Hans Hagen
  1 sibling, 1 reply; 6+ messages in thread
From: Philipp Gesang @ 2012-05-18  6:20 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

On 2012-05-18 00:00, Hans Hagen wrote:
> On 17-5-2012 16:11, Philipp Gesang wrote:
> 
> >So I judged that my preferred choice might not be as good as I
> >think. I got cold feet and am about to remove the slide where I
> >recommend the PS name (I can do that later anyways). Is there --
> >apart from personal opinions -- some valid reason to prefer one
> >name over the other *in general*?
> 
> For a project that has to run for a long time, I prefer filenames
> (file:). When fonts are stable names can be used too and the name
> resolved will check several names in the font. Spaces are ignored
> and names are lowercases. There's also some fallback name
> construction going on. Anyhow, the biggest problem is with fonts
> that have the same names (but different files).

I see. But even the filename can be treacherous: afair there is a
times.ttf among the MS core fonts but it’s different from the one
shipped with their office tools. The font name guessing, otoh,
seems pretty elaborate, though I have not had the opportunity to
look at it in detail.

>                                                 You can get some
> info when you run
> 
> mtxrun --script font --all --list pal
> 
> which shows all fonts with pal in the name(s)

... made me just appreciate how many great fonts come with the
minimals.

Thanks
Philipp


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

-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 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] 6+ messages in thread

* Re: Most portable font name
  2012-05-18  6:20   ` Philipp Gesang
@ 2012-05-18  9:40     ` Hans Hagen
  0 siblings, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2012-05-18  9:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 18-5-2012 08:20, Philipp Gesang wrote:
> On 2012-05-18 00:00, Hans Hagen wrote:
>> On 17-5-2012 16:11, Philipp Gesang wrote:
>>
>>> So I judged that my preferred choice might not be as good as I
>>> think. I got cold feet and am about to remove the slide where I
>>> recommend the PS name (I can do that later anyways). Is there --
>>> apart from personal opinions -- some valid reason to prefer one
>>> name over the other *in general*?
>>
>> For a project that has to run for a long time, I prefer filenames
>> (file:). When fonts are stable names can be used too and the name
>> resolved will check several names in the font. Spaces are ignored
>> and names are lowercases. There's also some fallback name
>> construction going on. Anyhow, the biggest problem is with fonts
>> that have the same names (but different files).
>
> I see. But even the filename can be treacherous: afair there is a
> times.ttf among the MS core fonts but it’s different from the one
> shipped with their office tools. The font name guessing, otoh,
> seems pretty elaborate, though I have not had the opportunity to
> look at it in detail.

I always put such fonts in tex/texmf-fonts/fonts/data so that I'm sure 
what gets used.

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

end of thread, other threads:[~2012-05-18  9:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-17 14:11 Most portable font name Philipp Gesang
2012-05-17 22:00 ` Hans Hagen
2012-05-17 22:16   ` Bill Meahan
2012-05-17 22:22     ` Hans Hagen
2012-05-18  6:20   ` Philipp Gesang
2012-05-18  9:40     ` 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).