Sophie

Sophie

distrib > Mageia > 5 > x86_64 > by-pkgid > 0da03bb1805d73f1aaf1c06fe3cffe2f > files > 345

fontforge-1.0-1.20120731.9.mga5.x86_64.rpm

<HTML>
<HEAD>
  <!-- Created with AOLpress/2.0 -->
  <!-- AP: Created on: 6-Dec-2000 -->
  <!-- AP: Last modified: 13-May-2009 -->
  <TITLE>Steps to creating a font...</TITLE>
  <LINK REL="icon" href="fftype16.png">
  <LINK REL="stylesheet" TYPE="text/css" HREF="FontForge.css">
</HEAD>
<BODY>
<P ALIGN=CENTER>
<IMG SRC="fontforge-banner-420.jpeg" WIDTH=420 HEIGHT=80>
<DIV id="in">
  <H1 ALIGN=Center>
    Tutorial<BR>
    <A HREF="ja/editexample.html"><IMG SRC="flags/Nisshoki-Japan.png" WIDTH="39"
	HEIGHT="26"></A>
    <A HREF="http://edt1023.sayya.org/fontforge/editexample.html"><IMG SRC="flags/taiwan.png"
	WIDTH="39" HEIGHT="26"></A>
    <A HREF="de/editexample.html"><IMG SRC="flags/GermanFlag.png" WIDTH="39"
	HEIGHT="26"></A>
  </H1>
  <P>
  This tutorial is also available as a <A HREF="fontforge-tutorial.pdf">pdf
  version</A>. If you wish to follow along with the tutorial,
  <A HREF="tutorial.tgz">this bundle</A> should provide you with the basic
  files you need.<BR>
  I shall not presume to teach aesthetics, I concentrate solely on the mechanics
  here.
  <UL>
    <LI>
      <A HREF="editexample.html#FontCreate">Font Creation</A>
    <LI>
      <A HREF="editexample.html#CharCreate">Creating a glyph (tracing outlines)</A>
    <LI>
      <A HREF="editspiro.html">Create glyph outlines using spiro points</A>
    <LI>
      <A HREF="importexample.html">Importing a glyph from Inkscape (or Illustrator,
      or some other vector editor)</A>
    <LI>
      <A HREF="editexample2.html#Navigating">Navigating to other glyphs</A>
    <LI>
      <A HREF="editexample2.html#Creating-o">On to the next glyph (consistent
      directions)</A>
    <LI>
      <A HREF="editexample3.html#consistent-stems">Consistent serifs and stem
      widths</A>
    <LI>
      <A HREF="editexample4.html#accents">Building accented glyphs</A>
    <LI>
      <A HREF="editexample4.html#ligature">Building a ligature</A>
    <LI>
      <A HREF="editexample4.html#lookups">Lookups and features</A>
    <LI>
      <A HREF="editexample5.html#metrics">Examining metrics</A>
      <UL>
	<LI>
	  <A HREF="editexample5.html#baseline">Setting the baseline to baseline spacing
	  of a font</A>
      </UL>
    <LI>
      <A HREF="editexample5.html#Kerning">Kerning</A>
    <LI>
      <A HREF="editexample6.html#Variants">Glyph variants</A>
    <LI>
      <A HREF="editexample6.html#Marks">Anchoring marks</A>
    <LI>
      <A HREF="editexample6-5.html#Conditional">Conditional features</A>
    <LI>
      <A HREF="editexample7.html#checking">Checking your font</A>
    <LI>
      <A HREF="editexample7.html#Bitmaps">Bitmaps</A>
    <LI>
      <A HREF="editexample7.html#generating">Generating it</A>
    <LI>
      <A HREF="editexample7.html#Families">Font Families</A>
    <LI>
      <A HREF="editexample7.html#summary">Final Summary</A>
    <LI>
      <A HREF="editexample8.html">Bitmap strikes</A>
    <LI>
      <A HREF="scripting-tutorial.html">Scripting Tutorial</A>
    <LI>
      <A HREF="scriptnotes.html#Special">Notes on various scripts</A>
    <LI>
      <FORM method=GET action="http://www.google.com/search">
	Searching the documentation:
	<INPUT type=hidden name="as_sitesearch" value="fontforge.sourceforge.net">
	<INPUT type=text name="as_q">
	<INPUT type=submit name="btnG" value="Search">(Powered by
	<A HREF="http://www.google.com/">Google</A>)
      </FORM>
  </UL>
  <BLOCKQUOTE ID="lit">
    <B><SMALL>NOBLEMAN:</SMALL></B><SMALL> </SMALL>Now this is what I call
    workmanship. There is nothing on earth more exquisite than a bonny book,
    with well-placed columns of rich black writing in beautiful borders, and
    illuminated pictures cunningly inset. But nowadays, instead of looking at
    books, people read them. A book might as well be one of those orders for
    bacon and bran that you are scribbling.
    <P ALIGN=Right>
    -- Saint Joan, Scene IV<BR>
    George Bernard Shaw, 1924
  </BLOCKQUOTE>
  <H2>
    <A NAME="FontCreate">Font creation</A>
  </H2>
  <P>
  First create a new font with the <CODE>New</CODE> command in the
  <CODE>File</CODE> menu (or by using the <KBD>-new</KBD> argument at startup).
  <P>
  <IMG SRC="newfont.png" WIDTH="419" HEIGHT="189">
  <P>
  Give the font a name with the <CODE><A HREF="fontinfo.html">Font
  Info</A></CODE> command from the <CODE>Element</CODE> menu. You use this
  same command to set the copyright message and change the ascent and descent
  (the sum of these two determines the size of the em square for the font,
  and by convention is 1000 for postscript fonts, a power of two (often 2048
  or 4096) for truetype fonts and 15,000 for Ikarus fonts). <SMALL>(Also if
  you are planning on making a truetype font you might want to check the Quadratic
  Splines checkbox to use the native truetype format. Editing is a little more
  difficult in this mode though)</SMALL>
  <P>
  <IMG SRC="fontinfo.png" WIDTH="614" HEIGHT="548">
  <P>
  You may also wish to use Encoding-&gt;Reencode to change what characters
  are available in your font. FontForge generally creates new fonts with an
  ISO-8859-1, which contains (most of) the characters needed for Western Europe
  (the latin letters, some accented letters, digits, and symbols).
  <H2>
    <A NAME="CharCreate">Creating a glyph</A>
  </H2>
  <P>
  Once you have done that you are ready to start editing glyphs. Double click
  on the entry for "C" in the font view above. You should now have an empty
  Outline Glyph window:
  <P>
  <IMG SRC="C1.png" WIDTH="272" HEIGHT="283">
  <P>
  The outline glyph window contains two palettes snuggled up on the left side
  of the window. The top palette contains a set of editing tools, and the bottom
  palette is for managing drawing layers. They can be added, deleted (not all!),
  shown or hidden, for example.
  <P>
  Cubic layers (C) use third-order Bezier splines, like PS fonts. Quadratic ones
  (Q) use second-degree splines, that are harder to edit, but mathematically
  easier and simpler to control, so they are used in TTF fonts.
  <P>
  The foreground (F) layer contains the outline that will become part of the font.
  The background (B) layer can contain images or line drawings that help you draw
  this particular glyph. The guide (#) layer contains lines that are useful on
  a font-wide basis (such as the x-height). Currently all layers are empty.
  <P>
  This window also shows the glyph's internal coordinate system with the x
  and y axes drawn in light grey. A line representing the glyph's advance width
  is drawn in black at the right edge of the window. FontForge assigns an advance
  width of one em (in PostScript that will usually be 1000 units) to the advance
  width of a new glyph.
  <P>
  Let us assume you already have a bitmap image of the glyph you are working
  on. Select the <A NAME="Import">Import</A> command from the File menu and
  import that image. It will be scaled so that it is as high as the em-square.
  <P>
  <IMG SRC="C2.png" WIDTH="272" HEIGHT="283">
  <P>
  Select the background layer as editable from the layers palette, move the
  mouse pointer to one of the edges of the image, hold down the shift key,
  depress and drag the corner until the image is a reasonable size, then move
  the pointer onto the dark part of the image, depress the mouse and drag until
  the image is properly positioned.
  <P>
  <IMG SRC="C3.png" WIDTH="272" HEIGHT="283">
  <P>
  If you have downloaded the
  <A HREF="http://sourceforge.net/projects/autotrace/">autotrace program</A>
  you can invoke <CODE>Element-&gt;AutoTrace</CODE> to generate an outline
  from the image. But if you have not you must add points yourself. Change
  the active layer to be the foreground, and go to the tools palette and select
  the round (or curve) point. Then move the pointer to the edge of the image
  and add a point. I find that it is best to add points at places where the
  curve is horizontal or vertical, at corners, or where the curve changes
  inflection (A change of inflection occurs in a curve like "S" where the curve
  changes from being open to the left to being open on the right. If you follow
  these rules hinting will work better.
  <P>
  <IMG SRC="C4.png" WIDTH="272" HEIGHT="283">
  <P>
  It is best to enter a curve in a clockwise fashion, so the next point should
  be added up at the top of the image on the flat section. Because the shape
  becomes flat here, a curve point is not appropriate, rather a tangent point
  is (this looks like a little triangle on the tools palette). A tangent point
  makes a nice transition from curves to straight lines because the curve leaves
  the point with the same slope the line had when it entered.
  <P>
  <IMG SRC="C5.png" WIDTH="272" HEIGHT="283">
  <P>
  At the moment this "curve" doesn't match the image at all, don't worry about
  that we'll fix it later, and anyway it will change on its own as we continue.
  Note that we now have a control point attached to the tangent point (the
  little blue x). The next point needs to go where the image changes direction
  abruptly. Neither a curve nor a tangent point is appropriate here, instead
  we must use a corner point (one of the little squares on the tools palette).
  <P>
  <IMG SRC="C6.png" WIDTH="272" HEIGHT="283">
  <P>
  As you see the old curve now follows the image a bit more closely. We continue
  adding points until we are ready to close the path.
  <P>
  <IMG SRC="C7.png" WIDTH="272" HEIGHT="283">
  <P>
  Then we close the path just by adding a new point on top of the old start
  point
  <P>
  <IMG SRC="C8.png" WIDTH="272" HEIGHT="283">
  <P>
  Now we must make the curve track the image more closely, to do this we must
  adjust the control points (the blue "x"es). To make all the control points
  visible select the pointer tool and double-click on the curve and then move
  the control points around until the curve looks right.
  <P>
  <IMG SRC="C9.png" WIDTH="266" HEIGHT="279">
  <P>
  Finally we set width. Again with the pointer tool, move the mouse to the
  width line on the right edge of the screen, depress and drag the line back
  to a reasonable location.
  <P>
  <IMG SRC="C10.png" WIDTH="266" HEIGHT="279">
  <P>
  And we are done with this glyph.
  <P>
  If you are mathematically inclined you may be interested in the coordinates
  that fontforge shows in the upper left of the window. Generally you can draw
  glyphs quite happily without bothering about these, but for those who are
  interested here is some basic info:
  <UL>
    <LI>
      Each glyph has its own coordinate system.
    <LI>
      The vertical origin is the font's baseline (the line on which most latin
      letters rest)
    <LI>
      The horizontal origin is the place where drawing the glyph will commence.
      In the example above what gets drawn initially is empty space, that is fairly
      common, and that empty space (the distance from the origin to the left edge
      of the glyph) is called the left side bearing.
    <LI>
      The units of the coordinate system are determined by the em-size of the font.
      This is the sum of the font's ascent and descent. In the example above the
      font's ascent is 800 and descent is 200, and the ascent line (the one just
      above the top of the "C") is 800 units from the baseline, while the descent
      line is 200 units below.
    <LI>
      So a position of 282,408 (as above) means that the cursor is 282 units right
      of the horizontal origin and 408 units above the baseline (or roughly halfway
      between baseline and ascent).
  </UL>
  <P ALIGN=Center>
  -- <A HREF="overview.html">Prev</A> -- <A HREF="overview.html">TOC</A> --
  <A HREF="editspiro.html">Next</A> --
</DIV>
</BODY></HTML>