Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 41ccc3b206824bb136a22fdbd1e55090 > files > 14

fontaine-0-3.svn39.fc15.i686.rpm

<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
 <head>
  <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
  <title>Fontaine</title>
  <link rel="stylesheet" type="text/css" href="css/main.css" media="screen" />
 </head>
 <body>

 <div id="title">
 </div>

 <div id="menu">
  <a href="#what_is_it" >What is Fontaine?</a>
  <a href="#libre">GPL License</a>
  <a href="#get_it">Getting Fontaine</a>
  <a href="#building">Building Fontaine</a>
  <a href="#usage">Usage</a>
  <a href="#options">Options</a>
  <a href="#output">Output</a>
  <a href="#ortho_groups">Orthography Groups</a>
  <a href="#ortho_coverage">Orthographic Coverage Levels</a>
  <a href="#sample_sentences">Sample Sentences</a>
  <a href="#refs">Orthography References</a>
  <a href="#bugs">Bugs</a>
 </div>

 <div id="content">
 
  <h1>Fontaine</h1>

  <h2 id="what_is_it" >What is Fontaine?</h2>
  <p>
   Fontaine is a command-line utility that displays key meta information
   about font files, including but not limited to <i>font name, style,
   weight, glyph count, character count, copyright, license information</i>
   and <i>orthographic coverage</i>.
  </p>
  
  <p>
   Fontaine is copyright © 2009 by Edward H. Trager.
  </p> 
  
  <h2 id="libre">GPL License</h2>
  <p>
   Fontaine is an Open Source program I wrote initially for the 
   <a href="http://openfontlibrary.org/">Open Font Library</a> project.  
   The software is released under the 
   <a href="http://www.gnu.org/licenses/old-licenses/gpl-2.0.html">GNU General Public License (GPL) v. 2</a>
   or any later version.
  </p>

  <h2 id="get_it">Getting Fontaine</h2>
  
  <p>
   Fontaine is now a project on sourceforge:
  </p>
  
  <p class="indented">
   <a href="http://sourceforge.net/projects/fontaine/">http://sourceforge.net/projects/fontaine/</a>
  </p>
   
  <p>
   Anyone may obtain the source code for Fontaine from the SVN repository:
  </p>
  
  <p class="code indented">
   svn co https://fontaine.svn.sourceforge.net/svnroot/fontaine
  </p>
  
  <h2 id="building">Building Fontaine</h2>
  <p>
   Fontaine uses the cross-platform <a href="">cmake</a>-based build system:
  </p>
  
  <p class="code indented">
   cd fontaine/trunk<br/>
   cmake .<br/>
   make<br/>
   su -c "make install"    <i>or</i>     sudo make install<br/>
  </p>
   
  <p>
   Fontaine is a new program and, as such, has not yet been tested on a large number of platforms.  The software is known
   to build and run successfully on Linux and OSX.
  </p>

  <h2 id="usage">Usage</h2>
  
  <p class="code indented">
   fontaine &lt;option(s)&gt; &lt;font file(s)&gt;
  </p>
  
  <p>
   Typical usage is:
  </p>
  
  <p class="code indented">
   fontaine --text some_font.ttf<br/>
   fontaine --xml --hide-missing some_other_font.otf<br/>
   fontaine --text --hide-fragmentary --show-missing another_font.ttf<br/>
  </p>

  <h2 id="options">Options</h2>
  
  <p>
   Command-line options are as follows:
  </p>
  
<table>
 <tr><td colspan="3" class="ttitle">Options</td></tr>
 <tr><td class="theader">Long</td><td class="theader">Short</td><td class="theader">Description</td></tr> 
 <tr><td>--fxhtml</td><td>-Y</td><td>Produce output report in FANCY XHTML format.</td></tr>
 <tr><td>--help</td><td>-h</td><td> Print help and exit</td></tr>
 <tr><td>--hide-fragmentary</td><td>-r</td><td> Don't report orthographies for which the font provides only fragmentary support.</td></tr>
 <tr><td>--hide-full</td><td>-f</td><td> Don't report orthographies for which the font provides full support</td></tr>
 <tr><td>--hide-missing</td><td>-m</td><td> Don't report which Unicode values are missing from fragmentary and partially-supported orthographies.</td></tr>
 <tr><td>--hide-partial</td><td>-p</td><td> Don't report orthographies for which the font provides only partial support</td></tr>
 <tr><td>--json</td><td>-J</td><td> Produce output report in JSON format. (default)</td></tr>
 <tr><td>--show-fragmentary</td><td>-R</td><td> Report orthographies for which the font provides only fragmentary support.</td></tr>
 <tr><td>--show-full</td><td>-F</td><td> Report orthographies for which the font provides full support</td></tr>
 <tr><td>--show-missing</td><td>-M</td><td> Report which Unicode values are missing from fragmentary and partially-supported orthographies. (default)</td></tr>
 <tr><td>--show-partial</td><td>-P</td><td> Report orthographies for which the font provides only partial support</td></tr>
 <tr><td>--text</td><td>-T</td><td> Produce output report in plain text format.</td></tr>
 <tr><td>--version</td><td>-v</td><td> Print version and exit</td></tr>
 <tr><td>--xhtml</td><td>-H</td><td> Produce output report in XHTML format.</td></tr>
 <tr><td>--xml</td><td>-X</td><td>Produce output report in XML format.</td></tr>
</table>

  <h2 id="output">Output</h2>
  <p>  
   To facilitate different usage scenarios, Fontaine produces reports in
   JSON (default), XML, XHTML, and TEXT formats.  
  </p>

  <p>
   A typical output report in JSON format will look something like this:
  </p>
  
  <pre class="code indented">
{
"fonts":[
  {
    "commonName":"Inconsolata",
    "nativeName":"",
    "subFamily":"Medium",
    "style":"normal",
    "weight":"normal",
    "fixedWidth":"yes",
    "fixedSizes":"no",
    "copyright":"Created by Raph Levien using his own tools and FontForge. Copyright ...",
    "license":"OFL",
    "licenseUrl":"http://scripts.sil.org/OFL",
    "glyphCount":"295",
    "characterCount":"286",
    "orthographies":[
      {
        "commonName":"Basic Latin",
        "nativeName":"Basic Latin",
        "supportLevel":"full"
      },
      {
        "commonName":"Western European",
        "nativeName":"Western European",
        "supportLevel":"full"
      },
      {
        "commonName":"Euro",
        "nativeName":"Euro",
        "supportLevel":"full"
      },
      {
        "commonName":"Turkish",
        "nativeName":"Türkçe",
        "supportLevel":"full"
      },
      {
        "commonName":"Central European",
        "nativeName":"Central European",
        "supportLevel":"full"
      },
      {
        "commonName":"Pan African Latin",
        "nativeName":"Pan African Latin",
        "supportLevel":"fragmentary",
        "percentCoverage":"24"
      }
    ]
  }
]}  
  </pre>

<p>
Typical output in TEXT format will look something like this:
</p>

<pre class="code indented">
Fonts:
   Font:
      Common name: id-asobi_LightOT
      Native name: id-懐遊体Light OT
      Sub family: Regular
      Style: normal
      Weight: normal
      Fixed width: no
      Fixed sizes: no
      Copyright: 井上 優 ( idfont・井上デザイン )
      License: Unknown or Proprietary License
      Glyph count: 9354
      Character count: 8207
      Orthographies:
         Orthography:
            Common name: Basic Latin
            Native name: Basic Latin
            Support level: full

         Orthography:
            Common name: Western European
            Native name: Western European
            Support level: full

         Orthography:
            Common name: Pan African Latin
            Native name: Pan African Latin
            Support level: fragmentary
            Percent coverage: 22

         Orthography:
            Common name: Basic Greek
            Native name: Ελληνικό αλφάβητο
            Support level: fragmentary
            Percent coverage: 69

         Orthography:
            Common name: Basic Cyrillic
            Native name: Кириллица
            Support level: full

         Orthography:
            Common name: Traditional Chinese
            Native name: 中文正體字
            Support level: partial
            Percent coverage: 90

         Orthography:
            Common name: Kana
            Native name: 仮名
            Support level: partial
            Percent coverage: 98

         Orthography:
            Common name: Joyo
            Native name: 日本常用漢字
            Support level: full

         Orthography:
            Common name: Japanese Jinmeiyo
            Native name: 日本人名用漢字
            Support level: partial
            Percent coverage: 99

         Orthography:
            Common name: Japanese Kokuji
            Native name: 日本国字
            Support level: partial
            Percent coverage: 88

         Orthography:
            Common name: Mathematical Operators
            Native name: Mathematical Operators
            Support level: fragmentary
            Percent coverage: 16
</pre>

   <p>
     When you want to know what is missing when coverage is less than <i>full</i>, just omit “--hide-missing”
    or else explicitly use the “--show-missing” option.  Output will look something like the following:
   </p>

<pre class="code indented">
        Orthography:
            Common name: Japanese Kokuji
            Native name: 日本国字
            Support level: partial
            Percent coverage: 88
            Missing values: U+4e44 (乄), U+6318 (挘), U+685b (桛), U+68bb (梻)
</pre>

  <p>
   In the source code tree, there is a
   base "MLR" ("markup language report") class from which specific
   reporting classes like JSON and XML are derived.  This architecture
   should make it easy to create additional report formats if needed.
  </p>
   
  <h2 id="ortho_groups">Orthography Groups</h2>
  
  <p>
   What do we mean when we say a font 
   provides coverage for “Western European” languages?  Of course we expect that such a
   font will coverage the Latin-based orthographies of the “big” languages of Western Europe, 
   such as <i>English, French, Spanish, German,</i> and so on.  But does that font also provide coverage
   for the orthographies of minority languages spoken –and presumably also written– in Western
   Europe?  It may be difficult to say – it clearly depends on which minority languages we include.
  </p>
  <p>
   Let's look at a perhaps less familiar case.  What does it mean for a font to 
   “provide coverage for Chinese”?  Some Chinese dictionaries include well over 40,000 characters, 
   but a modern educated Chinese person need only know perhaps 3,500 of those to be considered a fluent reader of 
   his or her language.
   So, in classifying a Chinese font, should we require that the font cover 40,000 characters, or just the 
   most common 3,500?
  </p>
  
  <p>
   I asked a lot of questions like these as I began sorting out orthographic coverage categories for Fontaine. 
   I wanted to create categories that would be meaningful to people looking for fonts to meet
   their needs.  Since I myself can't keep <i>ISO-8859-3</i> vs. <i>ISO-8849-4</i> straight, it seemed 
   obvious that a first step required avoiding jargon commonly used by standardization bodies. 
  </p>
  <p>
   Another problem is that adoption rates for scripts vary greatly.
   Some scripts, like Latin, are now used to write hundreds, perhaps thousands of languages.
   It seemed evident that creating an orthographic category for every language written in Latin
   might leave users "drowning" in long reports about hundreds of languages that would be 
   largely meaningless to them.  The only reasonable answer for pervasive scripts 
   like Latin is to create <i>orthographic groups</i>, but these groups have to be
   given sensible names like <i>Western European</i> (instead of <i>ISO-8859-1</i>) and <i>Pan African Latin</i>.
   Such names provide even uninformed users with a pretty good sense of what sorts of languages
   might be included without burdening them with hundreds of language listings.
  </p>
   
  <p>
   The orthography work thus required striking a careful balance between opposing forces -- simplicity
   versus specificity. Those forces operate differently on different scripts.  For pervasive scripts like
   Latin, one has to tend toward generality at the expense of specificity.  For non-pervasive scripts like
   Japanese, one is at liberty to provide users with a little more detail, such as how well a font
   covers the indigenously-invented <i>Kokuji</i> (国字 “<i>national</i>”) characters.  For scripts that fall in the 
   middle of the pack, like Arabic, providing specific coverage on major languages using 
   extended versions of the script seemed only prudent.  Thus all Arabic fonts are tested for their
   coverage of <i>Farsi, Urdu, Pashto, Uighur</i>, and  <i>Sindhi</i>, <i>inter alia</i>.
  </p>   
 
  <h2 id="ortho_coverage">Orthographic Coverage Levels</h2>
   
  <p>
   Fontaine divides coverage into four levels:
  </p>
   
   <table>
    <tr><td class="theader">Level</td><td class="theader">Coverage</td></tr>
    <tr><td>Full</td><td>100%</td></tr>
    <tr><td>Partial</td><td>Greater than or equal to 80%</td></tr>
    <tr><td>Fragmentary</td><td>Less than 80%</td></tr>
    <tr><td>None</td><td>0% or missing the key character</td></tr>
   </table>
   
  <p>
   Fontaine first looks for a key character (such as the letter <i>A</i> in Latin) that 
   is always expected to be present in a given orthography.
   If the key character is missing, the program skips additional checks for that orthography.  This can
   theoretically lead to false negatives in rare cases, but the occurrence of such a false negative almost
   guarantees that something is amiss with the font anyway.  If the key
   character is present, a full check is made.  If fewer than 80% of the characters needed for an orthography
   are present, coverage is classified as <i>fragmentary</i>.  Incomplete coverage greater than or equal to 80%
   is called <i>partial</i>.
  </p>
   
   <h2 id="sample_sentences">Sample Sentences</h2>

   <p>
    Fontaine's orthography database includes "sample sentences" and
    "sample characters" for each orthography. These can be used to
    create sample font specimens for given orthographies.
   </p>
   <p>
    For alphabets, pangrams provide a compact and clever
    way to present all the letters in an orthography. I have
    provided instances of pangrams for such orthographies where I have
    been able to locate them.
   </p>
   <p>
    For many other orthographies, it may be difficult or impossible to
    locate suitable pangrams.  In these cases, the approach I have taken is to
    provide a representative sentence borrowed from a well-known work
    of literature, poetry, or some other work of important cultural value.
    For example, for the Thai language I included a sentence from a stele 
    attributed to King Ramkamhaeng (พ่อขุนรามคำแหงมหาราช) of the Sukothai period. King Ramkamhaeng is credited with
    inventing the Thai alphabet.  Although the language used on the stele
    is archaic, every school child in Thailand is familiar with it.
   </p>
   <p>
    Orthographies such as Chinese and Japanese by their very nature don't support 
    pangrams.  For these orthographies, we can once again borrow an excerpt or two
    from a work of important literary value.  For example, for Chinese I have
    used the first few phrases of the famous Thousand Character Classic (千字文) attributed
    to Zhou Xingsi (周興嗣) of the Liang Dynasty.
   </p>
   <p>
    As of this writing, the selection of sample sentences remains incomplete.
    I hope that future contributions from the community will
    be valuable in expanding and vetting the orthography data
    that I have compiled so far.
   </p>

  <h2 id="refs">Orthography References</h2>
 <p>
   The following sources were referenced when compiling the orthography data for Fontaine:
 </p>

<p>
 <b>Characters needed for African orthographies in Latin writing system</b> by Denis Jacquerye. <a href="http://www.africanlocalisation.net/content/characters-needed-african-orthographies-latin-writing-system">http://www.africanlocalisation.net/content/characters-needed-african-orthographies-latin-writing-system</a>
</p>

<p>
   <b>Eesti Keele Institute Letter Database</b>. <a href="http://www.eki.ee/letter/">http://www.eki.ee/letter/</a>
 </p>

<p>
   <b>Frequency and Stroke Counts of Chinese Characters</b>. Copyright © 1996-2006 by Chih-Hao Tsai. <a href="http://technology.chtsai.org/charfreq/">http://technology.chtsai.org/charfreq/</a>
 </p>

<p>
 <b>Hong Kong Supplementary Character Set 香港增補字符集</b>, Office of the Government Chief Information Officer, Government of Hong Kong Special Adminstrative Region. <a href="http://www.ogcio.gov.hk/ccli/eng/hkscs/introduction.html">http://www.ogcio.gov.hk/ccli/eng/hkscs/introduction.html</a>
</p>

<p>
  <b>Japanese Jinmeiyō kanji 人名用漢字</b>, Wikipedia. <a href="http://en.wikipedia.org/wiki/Jinmeiy%C5%8D_kanji">http://en.wikipedia.org/wiki/Jinmeiyō_kanji</a>
</p>

<p>
  <b>Japanese Jōyō 常用漢字 character list</b>. <a href="http://www.aozora.gr.jp/kanji_table/">http://www.aozora.gr.jp/kanji_table/</a>
</p>

<p>
  <b>Japanese Kokuji 国字</b> national characters. <a href="http://www.sljfaq.org/w/kokuji">http://www.sljfaq.org/w/kokuji</a>
</p>

<p>
 <b>Language Geek</b>. <a href="http://www.languagegeek.com">http://www.languagegeek.com</a>
</p>

<p>
 <b>List of Pangrams</b>. Wikipedia. <a href="http://en.wikipedia.org/wiki/List_of_pangrams">http://en.wikipedia.org/wiki/List_of_pangrams</a>
</p>

<p>
 <b>Omniglot</b>, A guide to the languages, alphabets, syllabaries and other writing systems of the world. <a href="http://www.omniglot.com/">http://www.omniglot.com/</a>
</p>

<p>
 <b>Syriac Peshitta</b> originally at http://www.aifoundations.org/peshitta/; now  being superseded by 
Comprehensive Aramaic Lexicon at <a href="http://cal1.cn.huc.edu/">http://cal1.cn.huc.edu/</a>
</p>

<p>
 <b>Systèmes alphabétiques des langues africaines</b> copyright © 2006 by C. Chanard, LLACAN. <a href="http://sumale.vjf.cnrs.fr/phono/PhonologieN.php">http://sumale.vjf.cnrs.fr/phono/PhonologieN.php</a>
</p>

 <p>
   <b>Unicode Code Charts</b>. <a href="http://www.unicode.org/charts/">http://www.unicode.org/charts/</a>
 </p>

 <p>
   <b>UnicodeSet Demo</b>. <a href="http://unicode.org/cldr/utility/list-unicodeset.jsp">http://unicode.org/cldr/utility/list-unicodeset.jsp</a>
 </p>

<p>
 <b>Unicode Font Guide For Free/Libre Open Source Operating Systems</b>, <a href="http://unifont.org/fontguide/">http://unifont.org/fontguide/</a>
</p>

<p>
  <b>Wikipedia</b>, <a href="http://wikipedia.org/">http://wikipedia.org/</a>
</p>

  <h2 id="bugs">Bugs</h2>
 
  <p>
    Please refer to the online resources for the Fontaine project on Sourceforge.net for
    current information on bugs.
  </p>

<p>
 <img
  src="http://www.w3.org/Icons/valid-xhtml10-blue"
  alt="Valid XHTML 1.0 Strict" height="31" width="88" />
 <img style="border:0;width:88px;height:31px"
  src="http://jigsaw.w3.org/css-validator/images/vcss-blue"
  alt="Valid CSS!" />
</a>
</p>
    
 </div> <!-- content -->
 </body>
</html>