Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > by-pkgid > efc75c1dcfa45d4b2a545c38cda30759 > files > 91

pfaedit-020312-2mdk.i586.rpm

<HTML>
<HEAD>
  <!-- Created with AOLpress/2.0 -->
  <!-- AP: Created on: 7-Mar-2001 -->
  <!-- AP: Last modified: 18-Jan-2002 -->
  <TITLE>Frequently Asked Questions</TITLE>
</HEAD>
<BODY>
<H1 ALIGN=Center>
  Frequently Asked Questions<BR>
  <SMALL>(or all the questions I've been asked so far)</SMALL>
</H1>
<P>
<UL>
  <LI>
    <A HREF="#font-editor">Why a font editor, aren't there enough fonts
    already?</A>
  <LI>
    <A HREF="#widget-set">Why is PfaEdit based on a non-standard widget set?</A>
  <LI>
    <A HREF="#hint-subs">How do I make it use hint substitution?</A>
  <LI>
    <A HREF="#flex-hints">How do I make it use flex hints?</A>
  <LI>
    <A HREF="#fuzzy">My characters are all perfectly hinted, why do some stems
    have different widths (or appear fuzzy, or fade away completely)?</A>
  <LI>
    <A HREF="#new-name">How do I add a character with a new name?</A>
  <LI>
    <A HREF="#Open-size">Why isn't my Open Type font much smaller than the .pfb
    file?</A>
  <LI>
    <A HREF="faq.html#Open-difference">What's the difference between OpenType
    and PostScript (or TrueType) fonts?</A>
  <LI>
    <A HREF="#save-no-change">After I generate a font and quit, why does PfaEdit
    ask if I want to save the font? I didn't change anything.</A>
  <LI>
    <A HREF="#TeX">Why doesn't TeX work with my fonts?</A>
  <LI>
    <A HREF="#minify-iconify">Why does my window get iconified when I want to
    minify the view?</A>
  <LI>
    <A HREF="#no-mu">Why isn't there a character named "mu" in my greek font?</A>
  <LI>
    <A HREF="#no-copy-names">Why doesn't Edit-&gt;Copy copy character names as
    well as glyph info?</A>
  <LI>
    <A HREF="#cidmaps">What on earth are the cidmap files, and should I care
    about them?</A>
  <LI>
    <A HREF="cidmenu.html#CID">(What is a CID-keyed font?)</A>
  <LI>
    <A HREF="#font-install">How do I install the fonts once I've made them?</A>
  <LI>
    <A HREF="#How-mac">How do I edit fonts from my macintoy?</A>
  <LI>
    <A HREF="#simplify">Does the simplify command lose accuracy?</A>
  <LI>
    <A HREF="#cubic-quadratic">How does PfaEdit convert a cubic spline into a
    quadratic spline for truetype?</A>
  <LI>
    <A HREF="#quadratic-cubic">How does PfaEdit convert a quadratic spline into
    a cubic (when reading truetype)?</A>
</UL>
<P>
  <HR>
<DL>
  <DT>
    <A NAME="font-editor"><B>Why a font editor, aren't there enough fonts
    already?</B></A>
  <DD>
    Well... no. Otherwise I wouldn't be writing this.
    <OL>
      <LI>
	There are lots of latin fonts. There are far fewer greek, cyrillic, indic,
	thai, chinese, japanese, korean, unicode...
      <LI>
	Traditionally each new style of art and architecture has an associated style
	of fonts. New fonts are always being created to reflect the esthetics of
	the times.
      <LI>
	Computer font technology is constantly changing. A font-format that was useful
	10 years ago may not be so now.
      <LI>
	Even if you are satisfied with the fonts that do exist they may not be complete
	<UL>
	  <LI>
	    Missing ligatures
	  <LI>
	    Missing accented characters
	  <LI>
	    No matching cyrillic or greek characters
	</UL>
      <LI>
	Everybody wants a font of his/her own handwriting.
    </OL>
  <DT>
    <A NAME="widget-set"><B>Why is PfaEdit based on a non-standard widget
    set?</B></A>
  <DD>
    I wanted a widget set that would handle Unicode reasonably well. In particular
    I thought support for bidi text was important for hebrew and arabic typography.
    As I was unaware of any widget sets that did that, I wrote my own.<BR>
    I also wanted a widget set where I could actually figure out whether the
    checkbox was checked or not checked. In far too many cases my eyes can't
    work out which is which...
  <DT>
    <A NAME="hint-subs"><B>How do I make PfaEdit use hint substitution?</B></A>
  <DD>
    It happens automagically.
  <DT>
    <A NAME="flex-hints"><B>How do I make Pfaedit use flex hints?</B></A>
  <DD>
    PfaEdit will generate flex hints in situations where it is appropriate to
    do so. You don't need to do anything. If flex hints are used then the necessary
    subroutines will be added to the font. If they are not needed then the
    subroutines will not be added.
  <DT>
    <A NAME="fuzzy"><B>My characters are all perfectly hinted, why do some stems
    have different widths (or appear fuzzy, or fade away completely)?</B></A>
  <DD>
    Both PostScript and TrueType require that characters be drawn in a clockwise
    fashion. Some rasterizers don't care. But other rasterizers will have
    difficulties with counter-clockwise paths and produced stems of different
    widths when they should be the same, or fuzzy stems, or even nothing at all.
    The solution to this is to run Element-&gt;Correct Direction on all your
    characters before generating a font.<BR>
    But sometimes the poor rasterizer just can't do the right thing...
  <DT>
    <A NAME="new-name"><B>How do I add a character with a new name?</B></A>
  <DD>
    Let's say you wanted to add a "dotlessi" character to an ISO-8859-1 font
    (this encoding does not include dotlessi). There are two ways to approach
    the problem:
    <OL>
      <LI>
	Bring up <CODE>Element-&gt;Font Info</CODE><BR>
	Select the <CODE>Encoding</CODE> tab<BR>
	Increment the <CODE>Number of Characters</CODE> field by one (probably to
	<CODE>257</CODE>)<BR>
	Press <CODE>OK</CODE><BR>
	Scroll down to the end of the font and find the new character<BR>
	Select it<BR>
	Bring up <CODE>Element-&gt;Character Info</CODE><BR>
	Type your new name into the <CODE>Unicode Name</CODE> field (in this case
	you'd type in <CODE>dotlessi</CODE>)<BR>
	Press the <CODE>Set From Name</CODE> button<BR>
	Press <CODE>OK</CODE><BR>
	Now draw a dotlessi in the character.
      <LI>
	Bring up <CODE>Element-&gt;Font Info</CODE><BR>
	Select the <CODE>Encoding</CODE> tab<BR>
	Change the <CODE>Encoding</CODE> to <CODE>ISO-10646-1 (Unicode)</CODE><BR>
	Press <CODE>OK</CODE><BR>
	Bring up <CODE>View-&gt;Goto</CODE><BR>
	Type in <CODE>dotlessi</CODE><BR>
	Press <CODE>OK</CODE><BR>
	Now draw the dotlessi character in the selected character slot<BR>
	Bring up <CODE>Element-&gt;Font Info </CODE>again<BR>
	Change the <CODE>Encoding</CODE> back to whatever it was
    </OL>
  <DT>
    <A NAME="Open-size">Why isn't my Open Type font much smaller than the .pfb
    file?</A>
  <DD>
    This is probably because you didn't round to int before saving the font.
    PfaEdit will save the font using fixed point numbers which take up a lot
    more space than normal integers.
  <DT>
    <A NAME="Open-difference">What's the difference between OpenType and PostScript
    (or TrueType) fonts?</A>
  <DD>
    Both PostScript and TrueType define a file format and a glyph format. OpenType
    uses the TrueType file format with a PostScript glyph format (actually OpenType
    includes the TrueType glyph format as well, but the OpenType definition says
    such fonts should still be called TrueType fonts so I ignore that aspect).
    <P>
    The PostScript used in OpenType is slightly different from that used in .pfa
    and .pfb files. pfa/b files are Type1 fonts while OpenType uses Type2 fonts.
    Type2 is almost a superset of Type1 with a few minor changes and many extensions.
    Adobe's extensions to Type1 (flex hints, hint substitution, counter hints)
    by using subroutines have been added to Type2 as direct instructions.
  <DT>
    <A NAME="save-no-change">After I generate a font and quit, why does PfaEdit
    ask if I want to save the font? I didn't change anything.</A>
  <DD>
    There are two reasons why this might be happening.
    <OL>
      <LI>
	Even though you haven't changed anything in this session, PfaEdit may need
	to (re)generate hinting information on one or several characters (if, for
	example those characters have been changed (in an earlier session) but no
	hints have been generated for them since). These new hints will mark the
	font as changed.
      <LI>
	If your font has an XUID field in the Font Info, then PfaEdit will increment
	the final number in the XUID each time a postscript font is generated --
	and this also counts as a change. (Why does PfaEdit do this? Because Adobe
	says it should. A minor annoyance, but it avoids some problems with font
	caching when you change an old version of the font for a new one).
    </OL>
  <DT>
    <A NAME="Tex">Why doesn't TeX work with my fonts?</A>
  <DD>
    I'm a total novice with TeX. I am told that TeX (or some part of the TeX
    chain, dvips perhaps) expects fonts to be encoded in TeX base Encoding --
    sometimes called "Adobe Standard" by the TeX docs, but it isn't it's TeX
    base. So if you are having printing problems, missing glyphs, etc. try changing
    the encoding of your font to TeX Base (Go to Element-&gt;Font Info, select
    the Encoding tab, select TeX Base from the pulldown list).
  <DT>
    <A NAME="minify-iconify">Why does my window get iconified when I want to
    minify the view?</A>
  <DD>
    Some window managers (gnome-sawtooth for one) steal meta (alt) clicks from
    PfaEdit. So you can't use meta-middle-click to minify a character, you have
    to use the View menu-&gt;Zoom Out instead.
  <DT>
    <A NAME="no-mu">Why isn't there a character named "mu" in my greek font?</A>
  <DD>
    Adobe was thinking more of backwards compatability than sense when they assigned
    the names of the greek letters in their unicode encoding. Thus the name "mu"
    refers to the Micro Sign (U+00B5) and not to the letter mu. They also assigned
    Delta to Increment, and Omega to Ohm Sign. I have chosen to disregard these
    latter two, but the definition of "mu" is embedded in the Latin1 encoding
    and I can't reassign it with impunity.
    <P>
    In a half-hearted attempt to get around this problem I have caused PfaEdit
    to generate characters with names "mu", "uni00B5" and "uni03BC" whenever
    either U+00B5 or U+03BC is defined (and similarly for Omega and Delta).
  <DT>
    <A NAME="no-copy-names">Why doesn't Edit-&gt;Copy copy character names as
    well as glyph info?</A>
  <DD>
    Firstly because I believe that any attempt to copy a character's name will
    almost certainly be better done by defining a custom
    <A HREF="fontinfo.html#Encoding">encoding</A>.<BR>
    Secondly because most of the time you don't want the name copied.<BR>
    Thirdly because it is esthetically better that copy should only work with
    data and not meta-data.<BR>
    HOWEVER... enough people have asked this question that I've enabled a mode
    in <A HREF="editmenu.html#CharName">Edit-&gt;Copy From-&gt;Char Name</A>
    which allows you to change the default behavior.
  <DT>
    <A NAME="cidmaps">What on earth are cidmap files and should I care about
    them?</A>
  <DD>
    Some background:
    <P>
    When postscript was invented every character in a font was given a name,
    and an encoding which was specified by a 256 element array mapping character
    codes to names.
    <P>
    Then they started thinking about CJK fonts (and perhaps Unicode), which have
    huge character sets, and coming up with reasonable ASCII names for 10,000
    characters was <SMALL>a)</SMALL> a waste of space, <SMALL>b)</SMALL> fairly
    meaningless. So then adobe created CID-keyed fonts which have no character
    names and no encodings. Every character has an index (a CID), which is just
    a number, and this is sort of treated as a name. Then external to the font
    is another resource (a cmap) which provides the encoding for the font (and
    can support really grungy encoding schemes like SJIS), by mapping a sequence
    of input bytes to a CID.
    <P>
    Adobe provides certain standard cmap resources (ie. one for SJIS, one for
    JIS, one for Extended Unix whatever). Because these files are fairly painful
    to write Adobe has assigned standard meanings to CIDs so that everyone can
    use the same cmap file. -- Well actually there are 5 or 6 different standards,
    Japanese (JIS208), Japanese (JIS212), Korean, Chinese (Hong Kong, Taiwan),
    Chinese (Mainland, Singapore), Identity (Unicode) -- So CID 1 might be space,
    CID 2 might be "!", CID 935 might be "Katakana ka", etc.
    <P>
    So my cidmap files just give me a mapping between Adobe's CIDs and Unicode.
    So that PfaEdit will know what character it is working on. If they aren't
    present things should work ok, but PfaEdit would fill the font view with
    "?" rather than the appropriate character. And PfaEdit wouldn't be able to
    reencode the font into Unicode or anything else.
    <P>
    <P>
    So the cidmap files are only useful for people working on CID keyed CJK fonts.
    So most europeans/americans won't need them.
  <DT>
    <A NAME="font-install">How do I install the fonts once I've made them?</A>
  <DD>
    Well it rather depends on what system you are working on, and what type of
    font you've got:
    <DL>
      <DT>
	<STRONG>Unix &amp; X</STRONG>
      <DD>
	I'd suggest that you look at the
	<A HREF="http://www.linuxdoc.org/HOWTO/Font-HOWTO.html">linux font HOWTO
	file</A>, and the <A HREF="http://www.linuxdoc.org/HOWTO/mini/FDU/">font
	deuglification HOWTO</A> as good starting points. But I'll run over the
	highlights
	<P>
	Essentially you designate one (or several) directories as a "font directory".
	You move your fonts to that directory. You build up certain data structures
	that X needs, and you tell X to include this directory in your font path.
	Sadly different versions of X and the X font server use slightly different
	conventions. You may need to alter these procedures a bit.
	<P>
	For example, if you want to install a <EM>bdf font </EM>called frabnuts-13.bdf
	then you might:
	<BLOCKQUOTE>
	  <PRE>$ mkdir my_fonts
$ mv frabnuts-13.bdf my_fonts
$ cd my_fonts
$ bdftopcf frabnuts-13.bdf &gt;frabnuts-13.pcf
$ mkfontdir
$ xset fp+ `pwd`
</PRE>
	</BLOCKQUOTE>
	<P>
	and your fonts should be installed. After that, whenever you start X you
	need to remind it of where your fonts live, so you should add<BR>
	<CODE>&nbsp; &nbsp; $ xset fp+ /home/me/my_fonts</CODE><BR>
	to your .xsession (or equivalent).
	<P>
	If you want to install <EM>postscript fonts</EM><BR>
	You should generate them as postscript binary (.pfb) files, then move both
	the .pfb and the .afm file into (one of) your font directory(ies) and run
	<A HREF="http://rpmfind.net/linux/rpm2html/search.php?query=type1inst">type1inst</A>
	in it.<BR>
	type1inst will probably complain that your font doesn't have a foundry and
	will probably get the encoding wrong. You can either:
	<UL>
	  <LI>
	    Ignore it and nothing bad will happen
	  <LI>
	    Manually edit fonts.scale after running type1inst to fix these entries
	  <LI>
	    Make your font's Copyright be reasonable, and then edit type1inst and add
	    your foundry (directions for this are in type1inst itself)
	</UL>
	<P>
	If you want to install <EM>truetype fonts</EM><BR>
	You move the .ttf file into your font directory and run mkttfdir and
	mkfontdir.<BR>
	(<A HREF="http://rpmfind.net/linux/rpm2html/search.php?query=mkttfdir">mkttfdir</A>
	has a small problem with fonts created by PfaEdit, it will almost invariably
	complain that it doesn't recognize the foundry. You can safely ignore this,
	but if it bothers you then add a line to ttmkfdir.c at 936<BR>
	<CODE> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; { "PFED", "PfaEdit" },</CODE>
	<P>
	Some versions of X (ie, those shipped by redhat) rely on the x font server
	to do font work rather than the X server itself. You may want to use chkfontpath
	to add your new directory to the font server's font path (rather than xset
	fp).<BR>
	You may also need to insure that the font directory (and all its parent
	directories) are readable to world. (the font server runs as a non-priviledged
	user)
	<P>
	I haven't seen anything that says X supports <EM>opentype</EM> fonts yet,
	but since freetype does (and I think X's rasterizer uses freetype) then X
	might support them too. Installing them will require manual editing of
	fonts.scale though (mkttfdir uses freetype1 which doesn't support otf files).
	<P>
	That sounds really confusing. I appologize, I'm not a good writer and there
	are too many choices in configuring X...
      <DT>
	<STRONG>Windows</STRONG>
      <DD>
	You install truetype fonts on windows by dropping them into the \Windows\Fonts
	directory on your machine.<BR>
	If you want to use type1 or opentype fonts you may need to install adobe
	type manager and follow its instructions.<BR>
	I don't know how to install a bdf font. I'd look for a utility to convert
	bdf files to FON files and then drop the FON files into \Windows\Fonts.
      <DT>
	<STRONG>Macintosh OS 9</STRONG>
      <DD>
	Oh dear. The mac sticks fonts into resource forks and wraps them up in its
	own headers. Mac fonts aren't compatible with anybody else's. PfaEdit can
	create a resource fork if it wraps the font up in a macbinary encoding. See
	the <A HREF="faq.html#How-mac">following question</A> for more information.<BR>
	I've also written <A HREF="http://fondu.sourceforge.net/">some utilities
	</A>designed to convert from one format to another and they may prove
	useful.<BR>
	<A HREF="http://babel.uoregon.edu/yamada/fontconversionfaq.html">University
	of Oregon has some links that might be helpful</A>.<BR>
	Once you've converted your fonts you just drop them into the System Folder
	and they should be available after that.
      <DT>
	<STRONG>Macintosh OS X</STRONG>
      <DD>
	On OS/X fonts should be placed either in the top-level Library/Fonts directory
	(By default <CODE>/Mac OS X/Library/Fonts/</CODE>), in the System/Library/Fonts
	directory, or in the user's appropriate fonts sub-directory
	(<CODE>~/Library/Fonts</CODE>).<BR>
	Either a resource font (unwrapped from its macbinary wrapper) or a dfont
	may be used. I'm not sure whether postscript Type1 resource fonts work, but
	OpenType dfonts do (so if you want to use Postscript use OpenType).
    </DL>
  <DT>
    <A NAME="How-mac">How do I edit fonts from my macintoy?</A>
  <DD>
    <DL>
      <DT>
	Mac OS/9 (or less)
      <DD>
	Traditionally the macintosh has stored fonts in the resource fork of files.
	This causes problems for any machine other than a mac, because the very concept
	of a resource fork is lacking.<BR>
	There are several programs whose job it is to store all of a macintosh file
	in one package that can be manipulated on other systems (mac binary and binhex
	are the most common). PfaEdit knows how to read both of these formats and
	can extract a postscript or truetype font from either. PfaEdit can also create
	fonts in macbinary format (I see no reason to support both output formats,
	and macbinary is slightly simpler).<BR>
	So to edit a font on your mac:
	<OL>
	  <LI>
	    Find the file in the System Folder:Fonts folder
	  <LI>
	    Copy the file over to your unix machine
	    <UL>
	      <LI>
		Use Fetch and specify macbinary format
	      <LI>
		Or use some tool like binhex which can create the file directly
	    </UL>
	  <LI>
	    Open it in PfaEdit
	  <LI>
	    Edit it
	  <LI>
	    Save it back in macbinary format
	  <LI>
	    Copy it back to your mac
	    <UL>
	      <LI>
		Fetch will automatically undo the macbinary wrappers and make it be correct
	      <LI>
		Or various other tools can unwrap it.
	    </UL>
	  <LI>
	    Drop it back into your system folder (where it is automagically moved to
	    Fonts)
	</OL>
	<P>
	<STRONG>Caveat: </STRONG>I do not understand how to generate a font that
	handles 2 byte encodings on the mac. All the docs I've read seem to imply
	a 1 byte limitation. So all of these fonts will have a FOND that only knows
	about the first 256 characters.<BR>
	<STRONG>Caveat:</STRONG> A postscript font is useless on a macintosh unless
	it is acompanied by at least one bitmap font. If you generate a postscript
	font make sure you also generate an NFNT as well (this has the FOND).<BR>
	<STRONG>Caveat:</STRONG> The mac is picky about the filename used to contain
	a postscript file. It is based on the postscript font name but suffers a
	transformation. Don't try to rename this file. Basically the rules are (see
	<A HREF="http://partners.adobe.com/asn/developer/pdfs/tn/0091.Mac_Fond.pdf">Adobe
	Technical Note 0091</A>):
	<UL>
	  <LI>
	    The fontname is broken into chunks where each chunk starts with a capital
	    letter.
	  <LI>
	    The first chunk may have four lower case letters following the initial capital
	  <LI>
	    Subsequent chunks may only have two lower case letters following the capital.
	  <LI>
	    Non-letter characters (or at least hyphens) vanish.<BR>
	    So TimesBold =&gt; TimesBol, Helvetica-BoldItalic =&gt; HelveBolIta,
	    NCenturySchoolbook =&gt; NCenSch
	</UL>
      <DT>
	Mac OS/X
      <DD>
	On Mac OS/X you can run PfaEdit directly (if you've got XDarwin installed).
	OS/X has at least two font formats, some fonts are stored in the old format
	(see above), while others are stored as data fork resources. The data fork
	font files generally have the extension ".dfont", and PfaEdit can edit these
	directly.<BR>
	Editing old style fonts requires going through the same arcane procedures
	described above.
    </DL>
  <DT>
    Does the <A NAME="simplify">simplify</A> command lose accuracy?
  <DD>
    Yes it does.<BR>
    But not much.<BR>
    It is designed to replace a set of splines with another spline that nowhere
    differs from the original by more than one unit in the local coordinate
    system.<BR>
    If this level of accuracy is not good enough then (In the outline view):
    <UL>
      <LI>
	Edit-&gt;Select All
      <LI>
	Element-&gt;Transform
      <LI>
	Scale Uniformly: 1000%
      <LI>
	OK
      <LI>
	Simplify
      <LI>
	Element-&gt;Transform
      <LI>
	Scale Uniformly: 10%
      <LI>
	OK
    </UL>
    <P>
    This will replace a set of splines with a spline that differs from the original
    by no more than .1 unit.
  <DT>
    <A NAME="cubic-quadratic">How does PfaEdit convert a cubic spline into a
    quadratic spline for truetype?</A>
  <DD>
    Again this can involve a loss of accuracy.<BR>
    First PfaEdit checks to see if the spline happens to be a quadratic already
    (this would happen if you'd just read in a truetype font, or if a miracle
    occurred when you generated the spline).<BR>
    Otherwise PfaEdit will divide the original spline into smaller chunks and
    try to find a set of quadratic splines that differ from the cubic by no more
    than one unit anywhere. (Once you have picked two end-points and know the
    slope at those end-points there is only one quadratic spline possible between
    the two).
  <DT>
    <A NAME="quadratic-cubic">How does PfaEdit convert a quadratic spline into
    a cubic (when reading truetype)?</A>
  <DD>
    This is easy since any quadratic spline can already be represented as a cubic,
    it will just happen that the cubic term is always 0.
</DL>
<P>
<P ALIGN=Center>
-- <A HREF="scripting.html">Prev</A> --
<A HREF="overview.html" TARGET="_top">TOC</A> --
<A HREF="license.html" TARGET="_top">Next</A> --
</BODY></HTML>