Convert TT to PS only partially

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Convert TT to PS only partially

Peter Dyballa
Hello!

I want to develop a way to convert partially a Unicode encoded TrueType
to PostScript to make the wealth of these fonts available to TeX, using
fontinst to correct mistakes and create the whole bunch of files and
encodings.

I don't completely understand Fontforge's syntax. Since I think it's
quite useful to convert first the complete TT font to PS (to create a
test page from it with all the glyphs and peculiar names) I managed
already to handle this:

        fontforge --script 8r.pe Name.ttf Name.pfb

with a script of a few lines

        da = FileAccess($2)
        #
        if ( da < 0 ) # it target exists, don't convert again
            Open($1)
            Generate($2)
                # create test page?
        endif
        Quit()

How can I excerpt the glyphs to create a PS font with a TeX 8r
encoding? How can I achive the same with some kind of 'private'
encoding (as many glyphs as possible to meet the need of OT1, T1, TS1,
and expert encodings)?

        Select(0u02D9) # DOT ABOVE
        Copy()
        Select(0u01) # slot in 8r
        Paste()

Is it that, 252 times? How does Fontforge know from which source to
take and to which target to put? How can I save the glyphs as
PostScript instead of splines?

--
Greetings

   Pete

»¿ʇı̣ əsnqɐ ʇ,uɐɔ noʎ ɟı̣
ɓuı̣ɥʇʎuɐ sı̣ pooɓ ʇɐɥʍ«


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r 
_______________________________________________
Fontforge-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fontforge-users
Reply | Threaded
Open this post in threaded view
|

Re: Convert TT to PS only partially

George Williams
On Fri, 2005-06-10 at 03:48, Peter Dyballa wrote:
> I want to develop a way to convert partially a Unicode encoded TrueType
> to PostScript to make the wealth of these fonts available to TeX, using
> fontinst to correct mistakes and create the whole bunch of files and
> encodings.
...

>
> How can I excerpt the glyphs to create a PS font with a TeX 8r
> encoding? How can I achive the same with some kind of 'private'
> encoding (as many glyphs as possible to meet the need of OT1, T1, TS1,
> and expert encodings)?
>
> Select(0u02D9) # DOT ABOVE
> Copy()
> Select(0u01) # slot in 8r
> Paste()
>
> Is it that, 252 times?
Well you can do that. It's a lot easier to define an encoding and just
reencode the font to that encoding, then remove any extraneous glyphs
from the font.

You might also want to look at the sub font directory syntax specified
in ttf2tfm. FontForge can use this to generate a set of type1 fonts from
a large collection of glyphs (ie. a unicode or CJK font).
> How does Fontforge know from which source to
> take and to which target to put?
You have to switch fonts in between.
> How can I save the glyphs as
> PostScript instead of splines?
I don't know what you mean by that question. PostScript uses splines to
define its glyphs.



-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Fontforge-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fontforge-users
Reply | Threaded
Open this post in threaded view
|

Re: Convert TT to PS only partially

Peter Dyballa

Am 12.06.2005 um 05:15 schrieb George Williams:

> You might also want to look at the sub font directory syntax specified
> in ttf2tfm. FontForge can use this to generate a set of type1 fonts
> from
> a large collection of glyphs (ie. a unicode or CJK font).
>

I think I understand how this would work: the sfd file is an input file
to one of these statements

        Generate(filename,mult-sfd-file)
        Generate(filename,"","","",mult-sfd-file)

and will have in line `01´ the members of 8r encoding and in line `02´
those of my 8p encoding. The fontforge would generate two PFB files --
which names would they have? Or would it be one PFB file with two
'fonts' in it? Which could then also 'incorporate' the dotlessj from
Eddie Kohler's dotlessj programme ...

Is it that simple?

--
Greetings

   Pete

A lot of us are working harder than we want, at things we don't like to
do.  Why? ...In order to afford the sort of existence we don't care to
live.
        -- Bradford Angier



-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r 
_______________________________________________
Fontforge-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fontforge-users
Reply | Threaded
Open this post in threaded view
|

Re: Convert TT to PS only partially

George Williams
On Sun, 2005-06-12 at 08:45, Peter Dyballa wrote:

> Am 12.06.2005 um 05:15 schrieb George Williams:
>
> > You might also want to look at the sub font directory syntax specified
> > in ttf2tfm. FontForge can use this to generate a set of type1 fonts
> > from
> > a large collection of glyphs (ie. a unicode or CJK font).
> >
>
> I think I understand how this would work: the sfd file is an input file
> to one of these statements
Yes. Note that there is an unfortunate confusion of extensions here.
fontforge generally uses "sfd" to mean its own internal font file format
(spline font database), while the TeX people are using "sfd" to mean
sub-font directory.
>
> Generate(filename,mult-sfd-file)
> Generate(filename,"","","",mult-sfd-file)
>
> and will have in line `01´ the members of 8r encoding and in line `02´
> those of my 8p encoding.
I think so. I don't really recall the format of sfd files. I made them
work for TeX people who used them, and just ignore them. I'm not sure I
support having one glyph mapped to two different fonts (normally sfd
files don't do this except for .notdef) so you might need to produce two
sfd files. I don't remember.
> The fontforge would generate two PFB files --
> which names would they have? Or would it be one PFB file with two
> 'fonts' in it?
Something like <filename>"-01.pfb"
The pfb format does not support multiple fonts.

> Which could then also 'incorporate' the dotlessj from
> Eddie Kohler's dotlessj programme ...
The only glyphs that go into the output fonts are those called for in
the encodings (and any glyphs they may refer to). If your encoding
includes dotlessi, you get it. If it doesn't but your "i" glyph is made
up of a reference to dotlessi and to dot, you still get it. But if your
"i" is an inline copy you don't get a separate dotlessi.



-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Fontforge-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fontforge-users
Reply | Threaded
Open this post in threaded view
|

Re: Convert TT to PS only partially

Peter Dyballa

Am 12.06.2005 um 21:22 schrieb George Williams:

> The pfb format does not support multiple fonts.
>

Yes, of course. I was thinking of a PFB file with more than 256 glyphs
in it. Depending on the encoding you see these or those glyphs.

This is something that might make at least one TeXnician happy: Lars
Hellström from the fontinst team was warning about the use of
non-re-encoded, so to speak: raw fonts. This left me puzzled, thinking
of faking the map file fragments fontinst produces.

I think I might become a fan of Fontforge ...

--
Greetings

   Pete

There's no sense in being precise when you don't
even know what you're talking about.
         -- John von Neumann



-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r 
_______________________________________________
Fontforge-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fontforge-users