ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: Going crazy with font conversion (diaeresis)!
@ 2005-03-22 20:40 Steffen Wolfrum
  2005-03-23 11:29 ` Adam Lindsay
  0 siblings, 1 reply; 13+ messages in thread
From: Steffen Wolfrum @ 2005-03-22 20:40 UTC (permalink / raw)


Hallo Adam,


Adam Lindsay <atl@comp.lancs.ac.uk> wrote:

>  ...which I copied to the working directory. It should be included in
>  gwTeX.
>
>  Running the command above should do it.
>
>  > $ pltotf HelveticaNeue
>  > pltotf: HelveticaNeue.pl: No such file or directory
>
>  The fatal error above didn't generate a .pl file, so the next command
>  wasn't able to use it.
>
>  > As I have never used afm2pl or pltotf the usage above is praobably
>  > wrong.
>  > Or was my Fontforge export bad?
>  >
>  > And looking at your test file: where are your ttf and other files in
>  > this situation?
>  >
>  All in the working directory. I could then rename, put them in the
>  tex/fonts/ tree, and rehash, but that's it down to the essence.
>
>  Here's another goodie:
>

...


Now it works. Very nice and clear ways to get it.
But both goodies don't work with OSX's Helvetica.dfont

If you try it with the .ttf you'll get:

Error: pdfetex (file Helvetica.ttf): can't find table `OS/2'
  ==> Fatal error occurred, the output PDF file is not finished!


And if instead you use the .pfb
then you'll get the misplaced macrons and tildes that I've reported.

Just try this:

\loadmapline[+Helvetica Helvetica " TeXnANSIEncoding
ReEncodeFont " <texnansi.enc <Helvetica.pfb]
\starttext
\definedfont[Helvetica]
TAVAT.Po
T{}A{}V{}A{}T{}.{}P{}o

\showfont[Helvetica] R\d{o} R{\=o} R\~o
\page\showcharacters
\stoptext


I know the HelveticaNeue is more beautiful ... but nevertheless it 
would be interesting why there is the above error (and how it can be 
solved).


Thanks for your help and support!

Steffen

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

* Re: Going crazy with font conversion (diaeresis)!
  2005-03-22 20:40 Going crazy with font conversion (diaeresis)! Steffen Wolfrum
@ 2005-03-23 11:29 ` Adam Lindsay
  0 siblings, 0 replies; 13+ messages in thread
From: Adam Lindsay @ 2005-03-23 11:29 UTC (permalink / raw)


On 22 Mar 2005, at 20:40, Steffen Wolfrum wrote:

> Now it works. Very nice and clear ways to get it.
> But both goodies don't work with OSX's Helvetica.dfont
>
> If you try it with the .ttf you'll get:
>
> Error: pdfetex (file Helvetica.ttf): can't find table `OS/2'
>  ==> Fatal error occurred, the output PDF file is not finished!

Yes, I've run into that before: Apple doesn't include some 
"compatibility" tables (that TeX-centric utilities rely upon) in some 
of their platform fonts. I haven't found a good way to work with those 
TTFs.

> And if instead you use the .pfb
> then you'll get the misplaced macrons and tildes that I've reported.
>
> Just try this:
>
> \loadmapline[+Helvetica Helvetica " TeXnANSIEncoding
> ReEncodeFont " <texnansi.enc <Helvetica.pfb]
> \starttext
> \definedfont[Helvetica]
> TAVAT.Po
> T{}A{}V{}A{}T{}.{}P{}o
>
> \showfont[Helvetica] R\d{o} R{\=o} R\~o
> \page\showcharacters
> \stoptext

Hum. I haven't tried to replicate that here, but that looks like it 
might be an encoding problem: ConTeXt doesn't know that you're using a 
texnansi encoding, so it synthesises the characters using the 
definitions in enco-def. Is the above file the only way you tested it?

Does this help?

\loadmapline[+Helvetica Helvetica " TeXnANSIEncoding ReEncodeFont " 
<texnansi.enc <Helvetica.pfb]
\definefontsynonym[texnansi-Helvetica][Helvetica][encoding=texnansi]

\starttext
\definedfont[texnansi-Helvetica]
R\d{o} R{\=o} R\~o
\stoptext


> I know the HelveticaNeue is more beautiful ... but nevertheless it 
> would be interesting why there is the above error (and how it can be 
> solved).

I do think you're being greedy, but I have to admit I'm curious, too!

adam

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

* Re: Going crazy with font conversion (diaeresis)!
  2005-03-22 16:47 ` Adam Lindsay
@ 2005-03-23 18:57   ` Hans Hagen
  0 siblings, 0 replies; 13+ messages in thread
From: Hans Hagen @ 2005-03-23 18:57 UTC (permalink / raw)


Adam Lindsay wrote:
> On 22 Mar 2005, at 16:14, Steffen Wolfrum wrote:
> 
>> Your result looks promising - but duplicating your way showed me my  
>> command line limits:
>>
>> $ afm2pl -p `kpsewhich texnansi.enc` HelveticaNeue.afm
>> afm2pl: fatal: default.lig not found.
> 
> 
> Yeah, Gerben doesn't include that file that afm2pl expects. A quick  
> google revealed:
> http://www.tug.org/ftp/texlive/Contents/testinstalled/texmf/fonts/lig/ 
> afm2pl/default.lig
> 
> ...which I copied to the working directory. It should be included in  
> gwTeX.

afaik there is also a bug in afm2pl i.e. it does not look at the right spit for 
the lig file

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

* Re: Going crazy with font conversion (diaeresis)!
  2005-03-22 16:14 Steffen Wolfrum
@ 2005-03-22 16:47 ` Adam Lindsay
  2005-03-23 18:57   ` Hans Hagen
  0 siblings, 1 reply; 13+ messages in thread
From: Adam Lindsay @ 2005-03-22 16:47 UTC (permalink / raw)


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

On 22 Mar 2005, at 16:14, Steffen Wolfrum wrote:

> Your result looks promising - but duplicating your way showed me my  
> command line limits:
>
> $ afm2pl -p `kpsewhich texnansi.enc` HelveticaNeue.afm
> afm2pl: fatal: default.lig not found.

Yeah, Gerben doesn't include that file that afm2pl expects. A quick  
google revealed:
http://www.tug.org/ftp/texlive/Contents/testinstalled/texmf/fonts/lig/ 
afm2pl/default.lig

...which I copied to the working directory. It should be included in  
gwTeX.

Running the command above should do it.

> $ pltotf HelveticaNeue
> pltotf: HelveticaNeue.pl: No such file or directory

The fatal error above didn't generate a .pl file, so the next command  
wasn't able to use it.

> As I have never used afm2pl or pltotf the usage above is praobably  
> wrong.
> Or was my Fontforge export bad?
>
> And looking at your test file: where are your ttf and other files in  
> this situation?
>
All in the working directory. I could then rename, put them in the  
tex/fonts/ tree, and rehash, but that's it down to the essence.

Here's another goodie:

[-- Attachment #2: dumpafm.pe --]
[-- Type: application/text, Size: 222 bytes --]

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


The attached dumpafm.pe uses fontforge to write out afms from a given 
dfont (or other multi-font) file. So, for example:
  /usr/local/bin/fontforge -script dumpafm.pe /Library/Fonts/Optima.dfont
...creates five new AFMs (with kerning pairs) in the current directory.

 From there, you can do the above two steps. Since afm2pl also creates 
mapfiles, you can do some extra CLI magic to stitch those together 
automatically.

We can probably take the rest of this off-list if you need further CLI 
help.

cheers,
adam

[-- Attachment #4: 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] 13+ messages in thread

* Re: Going crazy with font conversion (diaeresis)!
@ 2005-03-22 16:23 Steffen Wolfrum
  0 siblings, 0 replies; 13+ messages in thread
From: Steffen Wolfrum @ 2005-03-22 16:23 UTC (permalink / raw)
  Cc: ntg-context

>  (When I open the AFM exported by FontForge there are no entries for 
>KerningPairs ...)

Nonsense! I opened the wrong file (as I said: going crazy...)

Sorry,

Steffen

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

* Re: Going crazy with font conversion (diaeresis)!
@ 2005-03-22 16:14 Steffen Wolfrum
  2005-03-22 16:47 ` Adam Lindsay
  0 siblings, 1 reply; 13+ messages in thread
From: Steffen Wolfrum @ 2005-03-22 16:14 UTC (permalink / raw)
  Cc: ntg-context

Hi Adam,


Adam Lindsay <atl@comp.lancs.ac.uk> wrote:

>  Okay, it was trickier than I thought.
>  But I used the .afm obtained from FontForge conversion, and discarded
>  the .pfb.
>
>    afm2pl -p `kpsewhich texnansi.enc` HelveticaNeue.afm
>    pltotf HelveticaNeue
>
>  Because I'm impatient, and wanted a quick test:
>  \loadmapline[+HelveticaNeue HelveticaNeue " TeXnANSIEncoding
>  ReEncodeFont " <texnansi.enc <HelveticaNeue.ttf]
>  \starttext
>  \definedfont[HelveticaNeue]
>  TAVAT.Po
>  T{}A{}V{}A{}T{}.{}P{}o
>  \stoptext


Your result looks promising - but duplicating your way showed me my 
command line limits:

$ afm2pl -p `kpsewhich texnansi.enc` HelveticaNeue.afm
afm2pl: fatal: default.lig not found.

$ pltotf HelveticaNeue
pltotf: HelveticaNeue.pl: No such file or directory

As I have never used afm2pl or pltotf the usage above is praobably wrong.
Or was my Fontforge export bad?
(When I open the AFM exported by FontForge there are no entries for 
KerningPairs ...)

And looking at your test file: where are your ttf and other files in 
this situation?

Steffen

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

* Re: Going crazy with font conversion (diaeresis)!
  2005-03-22 14:54 ` Ulrich Dirr
@ 2005-03-22 15:19   ` Adam Lindsay
  0 siblings, 0 replies; 13+ messages in thread
From: Adam Lindsay @ 2005-03-22 15:19 UTC (permalink / raw)


On 22 Mar 2005, at 14:54, Ulrich Dirr wrote:

> I'm really wondering why there's no kerning. (Maybe I missed something 
> of
> the previous discussion) Probably you should check the version numbers 
> of
> the pfb and then take the original AFMs from Adobe/Linotype.
>
Short answer (from what I can tell), Apple's TTFs keep the kerning in a 
different table from MS-centric TTFs. ttf2afm doesn't output any kerns 
from the font in question.

Conclude what you like from that, but remember that Apple invented 
TrueType :)

adam

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

* RE: Going crazy with font conversion (diaeresis)!
  2005-03-22 12:03 Steffen Wolfrum
  2005-03-22 14:43 ` Adam Lindsay
@ 2005-03-22 14:54 ` Ulrich Dirr
  2005-03-22 15:19   ` Adam Lindsay
  1 sibling, 1 reply; 13+ messages in thread
From: Ulrich Dirr @ 2005-03-22 14:54 UTC (permalink / raw)


Steffen Wolfrum wrote:
> But by using HelveticaNeue as is, there is no kerning information
> included. The result is quite poor, as you can imagine. And as I
> don't know how to set a proper kerning (in reasonable time) AND how
> to get it  available in ConTeXt I see no other alternative than using
> Helvetica and use the kerning information that is included in Adobes
> afm/tfm/vf files (being part of tetex).

I'm really wondering why there's no kerning. (Maybe I missed something of
the previous discussion) Probably you should check the version numbers of
the pfb and then take the original AFMs from Adobe/Linotype.

I'm also using Helvetica Neue (total 67 afms) and it works well ;-)

Ulrich Dirr

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

* Re: Going crazy with font conversion (diaeresis)!
  2005-03-22 12:03 Steffen Wolfrum
@ 2005-03-22 14:43 ` Adam Lindsay
  2005-03-22 14:54 ` Ulrich Dirr
  1 sibling, 0 replies; 13+ messages in thread
From: Adam Lindsay @ 2005-03-22 14:43 UTC (permalink / raw)


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

Hallo Steffen,

On 22 Mar 2005, at 12:03, Steffen Wolfrum wrote:
>>  I'd also ask why, if you have the superior Helvetica Neue working,
>>  you're trying to get the plain, no-oblique Helvetica going as well. I
> Yes it is, of course!
>
> But by using HelveticaNeue as is, there is no kerning information 
> included. The result is quite poor, as you can imagine.

Ouch! You're right!
That just goes to show how seldom I used the converted Mac fonts... :-/

> And as I don't know how to set a proper kerning (in reasonable time) 
> AND how to get it  available in ConTeXt I see no other alternative 
> than using Helvetica and use the kerning information that is included 
> in Adobes afm/tfm/vf files (being part of tetex).
>
> But if someone want to show me the path to proper TeX kerning I'd also 
> prefer HelveticaNeue, no doubt!

Okay, it was trickier than I thought.
But I used the .afm obtained from FontForge conversion, and discarded 
the .pfb.

  afm2pl -p `kpsewhich texnansi.enc` HelveticaNeue.afm
  pltotf HelveticaNeue

Because I'm impatient, and wanted a quick test:
\loadmapline[+HelveticaNeue HelveticaNeue " TeXnANSIEncoding 
ReEncodeFont " <texnansi.enc <HelveticaNeue.ttf]
\starttext
\definedfont[HelveticaNeue]
TAVAT.Po
T{}A{}V{}A{}T{}.{}P{}o
\stoptext


[-- Attachment #2: tester.pdf --]
[-- Type: application/pdf, Size: 4674 bytes --]

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



As far as I understand it, texfont assumes there's a .pfb if it sees an 
.afm, so texfont can't automate the installation as it stands. Are you 
sufficiently keen on texfont for this to be changed?

Cheers,
adam

[-- Attachment #4: 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] 13+ messages in thread

* Re: Going crazy with font conversion (diaeresis)!
@ 2005-03-22 12:03 Steffen Wolfrum
  2005-03-22 14:43 ` Adam Lindsay
  2005-03-22 14:54 ` Ulrich Dirr
  0 siblings, 2 replies; 13+ messages in thread
From: Steffen Wolfrum @ 2005-03-22 12:03 UTC (permalink / raw)


Hi Adam,


Adam Lindsay <atl@comp.lancs.ac.uk> wrote:


>  I'd also ask why, if you have the superior Helvetica Neue working,
>  you're trying to get the plain, no-oblique Helvetica going as well. I
>  see it like the difference between LM and the original CM conversion...
>  the later interpretation is far superior, and much more subtly drawn.


Yes it is, of course!

But by using HelveticaNeue as is, there is no kerning information 
included. The result is quite poor, as you can imagine. And as I 
don't know how to set a proper kerning (in reasonable time) AND how 
to get it  available in ConTeXt I see no other alternative than using 
Helvetica and use the kerning information that is included in Adobes 
afm/tfm/vf files (being part of tetex).

But if someone want to show me the path to proper TeX kerning I'd 
also prefer HelveticaNeue, no doubt!

Steffen

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

* Re: Going crazy with font conversion (diaeresis)!
  2005-03-21 15:37 Steffen Wolfrum
  2005-03-21 16:38 ` Adam Lindsay
@ 2005-03-21 18:13 ` Patrick Gundlach
  1 sibling, 0 replies; 13+ messages in thread
From: Patrick Gundlach @ 2005-03-21 18:13 UTC (permalink / raw)


Hello Steffen,

> But using Helvetica (from OSX system fonts) just won't work:

using? With ConTeXt? With LaTeX? With TeX? Is this a ConTeXt related
problem? Or is the problem with your font?

Patrick
-- 
ConTeXt wiki: http://contextgarden.net

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

* Re: Going crazy with font conversion (diaeresis)!
  2005-03-21 15:37 Steffen Wolfrum
@ 2005-03-21 16:38 ` Adam Lindsay
  2005-03-21 18:13 ` Patrick Gundlach
  1 sibling, 0 replies; 13+ messages in thread
From: Adam Lindsay @ 2005-03-21 16:38 UTC (permalink / raw)


Hi Steffen,

Why are you converting to type1 fonts when pdftex will work fine with 
the .ttf files "embedded" within the .dfont?

My approach to using Mac fonts has been:
1) create a temp directory
2) fondu original.dfont from within the temp directory
3) run texfont on the resulting TTFs

I've avoided conversion between TrueType and Type1 because they're 
different imaging models, and curves change along the way. Other people 
advise against this for licensing reasons, as well.

I'd also ask why, if you have the superior Helvetica Neue working, 
you're trying to get the plain, no-oblique Helvetica going as well. I 
see it like the difference between LM and the original CM conversion... 
the later interpretation is far superior, and much more subtly drawn.

But all these questions mask the fact that I have no clue about the 
FontForge/FontLab messes... I want to help you avoid them! :)

adam

On 21 Mar 2005, at 15:37, Steffen Wolfrum wrote:

> Hi,
>
> using HelveticaNeue (came with OSX) was fine.
>
> But using Helvetica (from OSX system fonts) just won't work:
>
> - when I have converted the .dfont to .pfb with FontLab the diaeresis 
> of the german Umlaute (äöü) are too far to the right.
>
> - when I have converted the .dfont to .pfb with FontForge the 
> diaeresis of the german Umlaute (äöü) are OK, but all other elements 
> like Macron, Cedilla or Ogonek are too far to the left (!).
>
>
> Anybody knows this strange behaviour?
> And even better what to do to avoid this mess??
>
> Steffen
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context

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

* Going crazy with font conversion (diaeresis)!
@ 2005-03-21 15:37 Steffen Wolfrum
  2005-03-21 16:38 ` Adam Lindsay
  2005-03-21 18:13 ` Patrick Gundlach
  0 siblings, 2 replies; 13+ messages in thread
From: Steffen Wolfrum @ 2005-03-21 15:37 UTC (permalink / raw)


Hi,

using HelveticaNeue (came with OSX) was fine.

But using Helvetica (from OSX system fonts) just won't work:

- when I have converted the .dfont to .pfb with 
FontLab the diaeresis of the german Umlaute (äöü) 
are too far to the right.

- when I have converted the .dfont to .pfb with 
FontForge the diaeresis of the german Umlaute 
(äöü) are OK, but all other elements like Macron, 
Cedilla or Ogonek are too far to the left (!).


Anybody knows this strange behaviour?
And even better what to do to avoid this mess??

Steffen

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

end of thread, other threads:[~2005-03-23 18:57 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-22 20:40 Going crazy with font conversion (diaeresis)! Steffen Wolfrum
2005-03-23 11:29 ` Adam Lindsay
  -- strict thread matches above, loose matches on Subject: below --
2005-03-22 16:23 Steffen Wolfrum
2005-03-22 16:14 Steffen Wolfrum
2005-03-22 16:47 ` Adam Lindsay
2005-03-23 18:57   ` Hans Hagen
2005-03-22 12:03 Steffen Wolfrum
2005-03-22 14:43 ` Adam Lindsay
2005-03-22 14:54 ` Ulrich Dirr
2005-03-22 15:19   ` Adam Lindsay
2005-03-21 15:37 Steffen Wolfrum
2005-03-21 16:38 ` Adam Lindsay
2005-03-21 18:13 ` Patrick Gundlach

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