You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by vh...@apache.org on 2014/02/03 20:29:26 UTC

svn commit: r1564017 [6/9] - in /xmlgraphics/fop/trunk: ./ lib/ src/codegen/fonts/ src/java/org/apache/fop/afp/ src/java/org/apache/fop/afp/fonts/ src/java/org/apache/fop/afp/goca/ src/java/org/apache/fop/afp/svg/ src/java/org/apache/fop/fo/ src/java/o...

Modified: xmlgraphics/fop/trunk/src/codegen/fonts/TimesRoman.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/codegen/fonts/TimesRoman.xml?rev=1564017&r1=1564016&r2=1564017&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/codegen/fonts/TimesRoman.xml (original)
+++ xmlgraphics/fop/trunk/src/codegen/fonts/TimesRoman.xml Mon Feb  3 19:29:24 2014
@@ -22,245 +22,246 @@
    <family-name>Times</family-name>
    <class-name>TimesRoman</class-name>
    <encoding>StandardEncoding</encoding>
+   <underline-position>-100</underline-position>
+   <underline-thickness>50</underline-thickness>
    <cap-height>662</cap-height>
    <x-height>450</x-height>
    <ascender>683</ascender>
    <descender>-217</descender>
    <first-char>32</first-char>
    <last-char>255</last-char>
-   <widths>
-      <char name="A" width="722"/>
-      <char name="AE" width="889"/>
-      <char name="Aacute" width="722"/>
-      <char name="Acircumflex" width="722"/>
-      <char name="Adieresis" width="722"/>
-      <char name="Agrave" width="722"/>
-      <char name="Aring" width="722"/>
-      <char name="Atilde" width="722"/>
-      <char name="B" width="667"/>
-      <char name="C" width="667"/>
-      <char name="Ccedilla" width="667"/>
-      <char name="D" width="722"/>
-      <char name="E" width="611"/>
-      <char name="Eacute" width="611"/>
-      <char name="Ecircumflex" width="611"/>
-      <char name="Edieresis" width="611"/>
-      <char name="Egrave" width="611"/>
-      <char name="Eth" width="722"/>
-      <char name="Euro" width="500"/>
-      <char name="F" width="556"/>
-      <char name="G" width="722"/>
-      <char name="H" width="722"/>
-      <char name="I" width="333"/>
-      <char name="Iacute" width="333"/>
-      <char name="Icircumflex" width="333"/>
-      <char name="Idieresis" width="333"/>
-      <char name="Igrave" width="333"/>
-      <char name="J" width="389"/>
-      <char name="K" width="722"/>
-      <char name="L" width="611"/>
-      <char name="Lslash" width="611"/>
-      <char name="M" width="889"/>
-      <char name="N" width="722"/>
-      <char name="Ntilde" width="722"/>
-      <char name="O" width="722"/>
-      <char name="OE" width="889"/>
-      <char name="Oacute" width="722"/>
-      <char name="Ocircumflex" width="722"/>
-      <char name="Odieresis" width="722"/>
-      <char name="Ograve" width="722"/>
-      <char name="Oslash" width="722"/>
-      <char name="Otilde" width="722"/>
-      <char name="P" width="556"/>
-      <char name="Q" width="722"/>
-      <char name="R" width="667"/>
-      <char name="S" width="556"/>
-      <char name="Scaron" width="556"/>
-      <char name="T" width="611"/>
-      <char name="Thorn" width="556"/>
-      <char name="U" width="722"/>
-      <char name="Uacute" width="722"/>
-      <char name="Ucircumflex" width="722"/>
-      <char name="Udieresis" width="722"/>
-      <char name="Ugrave" width="722"/>
-      <char name="V" width="722"/>
-      <char name="W" width="944"/>
-      <char name="X" width="722"/>
-      <char name="Y" width="722"/>
-      <char name="Yacute" width="722"/>
-      <char name="Ydieresis" width="722"/>
-      <char name="Z" width="611"/>
-      <char name="Zcaron" width="611"/>
-      <char name="a" width="444"/>
-      <char name="aacute" width="444"/>
-      <char name="acircumflex" width="444"/>
-      <char name="acute" width="333"/>
-      <char name="adieresis" width="444"/>
-      <char name="ae" width="667"/>
-      <char name="agrave" width="444"/>
-      <char name="ampersand" width="778"/>
-      <char name="aring" width="444"/>
-      <char name="asciicircum" width="469"/>
-      <char name="asciitilde" width="541"/>
-      <char name="asterisk" width="500"/>
-      <char name="at" width="921"/>
-      <char name="atilde" width="444"/>
-      <char name="b" width="500"/>
-      <char name="backslash" width="278"/>
-      <char name="bar" width="200"/>
-      <char name="braceleft" width="480"/>
-      <char name="braceright" width="480"/>
-      <char name="bracketleft" width="333"/>
-      <char name="bracketright" width="333"/>
-      <char name="breve" width="333"/>
-      <char name="brokenbar" width="200"/>
-      <char name="bullet" width="350"/>
-      <char name="c" width="444"/>
-      <char name="caron" width="333"/>
-      <char name="ccedilla" width="444"/>
-      <char name="cedilla" width="333"/>
-      <char name="cent" width="500"/>
-      <char name="circumflex" width="333"/>
-      <char name="colon" width="278"/>
-      <char name="comma" width="250"/>
-      <char name="copyright" width="760"/>
-      <char name="currency" width="500"/>
-      <char name="d" width="500"/>
-      <char name="dagger" width="500"/>
-      <char name="daggerdbl" width="500"/>
-      <char name="degree" width="400"/>
-      <char name="dieresis" width="333"/>
-      <char name="divide" width="564"/>
-      <char name="dollar" width="500"/>
-      <char name="dotaccent" width="333"/>
-      <char name="dotlessi" width="278"/>
-      <char name="e" width="444"/>
-      <char name="eacute" width="444"/>
-      <char name="ecircumflex" width="444"/>
-      <char name="edieresis" width="444"/>
-      <char name="egrave" width="444"/>
-      <char name="eight" width="500"/>
-      <char name="ellipsis" width="1000"/>
-      <char name="emdash" width="1000"/>
-      <char name="endash" width="500"/>
-      <char name="equal" width="564"/>
-      <char name="eth" width="500"/>
-      <char name="exclam" width="333"/>
-      <char name="exclamdown" width="333"/>
-      <char name="f" width="333"/>
-      <char name="fi" width="556"/>
-      <char name="five" width="500"/>
-      <char name="fl" width="556"/>
-      <char name="florin" width="500"/>
-      <char name="four" width="500"/>
-      <char name="fraction" width="167"/>
-      <char name="g" width="500"/>
-      <char name="germandbls" width="500"/>
-      <char name="grave" width="333"/>
-      <char name="greater" width="564"/>
-      <char name="guillemotleft" width="500"/>
-      <char name="guillemotright" width="500"/>
-      <char name="guilsinglleft" width="333"/>
-      <char name="guilsinglright" width="333"/>
-      <char name="h" width="500"/>
-      <char name="hungarumlaut" width="333"/>
-      <char name="hyphen" width="333"/>
-      <char name="i" width="278"/>
-      <char name="iacute" width="278"/>
-      <char name="icircumflex" width="278"/>
-      <char name="idieresis" width="278"/>
-      <char name="igrave" width="278"/>
-      <char name="j" width="278"/>
-      <char name="k" width="500"/>
-      <char name="l" width="278"/>
-      <char name="less" width="564"/>
-      <char name="logicalnot" width="564"/>
-      <char name="lslash" width="278"/>
-      <char name="m" width="778"/>
-      <char name="macron" width="333"/>
-      <char name="minus" width="324"/>
-      <char name="mu" width="500"/>
-      <char name="multiply" width="564"/>
-      <char name="n" width="500"/>
-      <char name="nine" width="500"/>
-      <char name="ntilde" width="500"/>
-      <char name="numbersign" width="500"/>
-      <char name="o" width="500"/>
-      <char name="oacute" width="500"/>
-      <char name="ocircumflex" width="500"/>
-      <char name="odieresis" width="500"/>
-      <char name="oe" width="722"/>
-      <char name="ogonek" width="333"/>
-      <char name="ograve" width="500"/>
-      <char name="one" width="500"/>
-      <char name="onehalf" width="750"/>
-      <char name="onequarter" width="750"/>
-      <char name="onesuperior" width="300"/>
-      <char name="ordfeminine" width="276"/>
-      <char name="ordmasculine" width="310"/>
-      <char name="oslash" width="500"/>
-      <char name="otilde" width="500"/>
-      <char name="p" width="500"/>
-      <char name="paragraph" width="453"/>
-      <char name="parenleft" width="333"/>
-      <char name="parenright" width="333"/>
-      <char name="percent" width="833"/>
-      <char name="period" width="250"/>
-      <char name="periodcentered" width="250"/>
-      <char name="perthousand" width="1000"/>
-      <char name="plus" width="564"/>
-      <char name="plusminus" width="564"/>
-      <char name="q" width="500"/>
-      <char name="question" width="444"/>
-      <char name="questiondown" width="444"/>
-      <char name="quotedbl" width="408"/>
-      <char name="quotedblbase" width="444"/>
-      <char name="quotedblleft" width="444"/>
-      <char name="quotedblright" width="444"/>
-      <char name="quoteleft" width="333"/>
-      <char name="quoteright" width="333"/>
-      <char name="quotesinglbase" width="333"/>
-      <char name="quotesingle" width="180"/>
-      <char name="r" width="333"/>
-      <char name="registered" width="760"/>
-      <char name="ring" width="333"/>
-      <char name="s" width="389"/>
-      <char name="scaron" width="389"/>
-      <char name="section" width="500"/>
-      <char name="semicolon" width="278"/>
-      <char name="seven" width="500"/>
-      <char name="six" width="500"/>
-      <char name="slash" width="278"/>
-      <char name="space" width="250"/>
+    <char-metrics>
+      <char name="A" width="722" llx="15" lly="0" urx="706" ury="674"/>
+      <char name="AE" width="889" llx="0" lly="0" urx="863" ury="662"/>
+      <char name="Aacute" width="722" llx="15" lly="0" urx="706" ury="890"/>
+      <char name="Acircumflex" width="722" llx="15" lly="0" urx="706" ury="886"/>
+      <char name="Adieresis" width="722" llx="15" lly="0" urx="706" ury="835"/>
+      <char name="Agrave" width="722" llx="15" lly="0" urx="706" ury="890"/>
+      <char name="Aring" width="722" llx="15" lly="0" urx="706" ury="898"/>
+      <char name="Atilde" width="722" llx="15" lly="0" urx="706" ury="850"/>
+      <char name="B" width="667" llx="17" lly="0" urx="593" ury="662"/>
+      <char name="C" width="667" llx="28" lly="-14" urx="633" ury="676"/>
+      <char name="Ccedilla" width="667" llx="28" lly="-215" urx="633" ury="676"/>
+      <char name="D" width="722" llx="16" lly="0" urx="685" ury="662"/>
+      <char name="E" width="611" llx="12" lly="0" urx="597" ury="662"/>
+      <char name="Eacute" width="611" llx="12" lly="0" urx="597" ury="890"/>
+      <char name="Ecircumflex" width="611" llx="12" lly="0" urx="597" ury="886"/>
+      <char name="Edieresis" width="611" llx="12" lly="0" urx="597" ury="835"/>
+      <char name="Egrave" width="611" llx="12" lly="0" urx="597" ury="890"/>
+      <char name="Eth" width="722" llx="16" lly="0" urx="685" ury="662"/>
+      <char name="Euro" width="500" llx="0" lly="0" urx="0" ury="0"/>
+      <char name="F" width="556" llx="12" lly="0" urx="546" ury="662"/>
+      <char name="G" width="722" llx="32" lly="-14" urx="709" ury="676"/>
+      <char name="H" width="722" llx="19" lly="0" urx="702" ury="662"/>
+      <char name="I" width="333" llx="18" lly="0" urx="315" ury="662"/>
+      <char name="Iacute" width="333" llx="18" lly="0" urx="317" ury="890"/>
+      <char name="Icircumflex" width="333" llx="11" lly="0" urx="322" ury="886"/>
+      <char name="Idieresis" width="333" llx="18" lly="0" urx="315" ury="835"/>
+      <char name="Igrave" width="333" llx="18" lly="0" urx="315" ury="890"/>
+      <char name="J" width="389" llx="10" lly="-14" urx="370" ury="662"/>
+      <char name="K" width="722" llx="34" lly="0" urx="723" ury="662"/>
+      <char name="L" width="611" llx="12" lly="0" urx="598" ury="662"/>
+      <char name="Lslash" width="611" llx="12" lly="0" urx="598" ury="662"/>
+      <char name="M" width="889" llx="12" lly="0" urx="863" ury="662"/>
+      <char name="N" width="722" llx="12" lly="-11" urx="707" ury="662"/>
+      <char name="Ntilde" width="722" llx="12" lly="-11" urx="707" ury="850"/>
+      <char name="O" width="722" llx="34" lly="-14" urx="688" ury="676"/>
+      <char name="OE" width="889" llx="30" lly="-6" urx="885" ury="668"/>
+      <char name="Oacute" width="722" llx="34" lly="-14" urx="688" ury="890"/>
+      <char name="Ocircumflex" width="722" llx="34" lly="-14" urx="688" ury="886"/>
+      <char name="Odieresis" width="722" llx="34" lly="-14" urx="688" ury="835"/>
+      <char name="Ograve" width="722" llx="34" lly="-14" urx="688" ury="890"/>
+      <char name="Oslash" width="722" llx="34" lly="-80" urx="688" ury="734"/>
+      <char name="Otilde" width="722" llx="34" lly="-14" urx="688" ury="850"/>
+      <char name="P" width="556" llx="16" lly="0" urx="542" ury="662"/>
+      <char name="Q" width="722" llx="34" lly="-178" urx="701" ury="676"/>
+      <char name="R" width="667" llx="17" lly="0" urx="659" ury="662"/>
+      <char name="S" width="556" llx="42" lly="-14" urx="491" ury="676"/>
+      <char name="Scaron" width="556" llx="42" lly="-14" urx="491" ury="886"/>
+      <char name="T" width="611" llx="17" lly="0" urx="593" ury="662"/>
+      <char name="Thorn" width="556" llx="16" lly="0" urx="542" ury="662"/>
+      <char name="U" width="722" llx="14" lly="-14" urx="705" ury="662"/>
+      <char name="Uacute" width="722" llx="14" lly="-14" urx="705" ury="890"/>
+      <char name="Ucircumflex" width="722" llx="14" lly="-14" urx="705" ury="886"/>
+      <char name="Udieresis" width="722" llx="14" lly="-14" urx="705" ury="835"/>
+      <char name="Ugrave" width="722" llx="14" lly="-14" urx="705" ury="890"/>
+      <char name="V" width="722" llx="16" lly="-11" urx="697" ury="662"/>
+      <char name="W" width="944" llx="5" lly="-11" urx="932" ury="662"/>
+      <char name="X" width="722" llx="10" lly="0" urx="704" ury="662"/>
+      <char name="Y" width="722" llx="22" lly="0" urx="703" ury="662"/>
+      <char name="Yacute" width="722" llx="22" lly="0" urx="703" ury="890"/>
+      <char name="Ydieresis" width="722" llx="22" lly="0" urx="703" ury="835"/>
+      <char name="Z" width="611" llx="9" lly="0" urx="597" ury="662"/>
+      <char name="Zcaron" width="611" llx="9" lly="0" urx="597" ury="886"/>
+      <char name="a" width="444" llx="37" lly="-10" urx="442" ury="460"/>
+      <char name="aacute" width="444" llx="37" lly="-10" urx="442" ury="678"/>
+      <char name="acircumflex" width="444" llx="37" lly="-10" urx="442" ury="674"/>
+      <char name="acute" width="333" llx="93" lly="507" urx="317" ury="678"/>
+      <char name="adieresis" width="444" llx="37" lly="-10" urx="442" ury="623"/>
+      <char name="ae" width="667" llx="38" lly="-10" urx="632" ury="460"/>
+      <char name="agrave" width="444" llx="37" lly="-10" urx="442" ury="678"/>
+      <char name="ampersand" width="778" llx="42" lly="-13" urx="750" ury="676"/>
+      <char name="aring" width="444" llx="37" lly="-10" urx="442" ury="711"/>
+      <char name="asciicircum" width="469" llx="24" lly="297" urx="446" ury="662"/>
+      <char name="asciitilde" width="541" llx="40" lly="183" urx="502" ury="323"/>
+      <char name="asterisk" width="500" llx="69" lly="265" urx="432" ury="676"/>
+      <char name="at" width="921" llx="116" lly="-14" urx="809" ury="676"/>
+      <char name="atilde" width="444" llx="37" lly="-10" urx="442" ury="638"/>
+      <char name="b" width="500" llx="3" lly="-10" urx="468" ury="683"/>
+      <char name="backslash" width="278" llx="-9" lly="-14" urx="287" ury="676"/>
+      <char name="bar" width="200" llx="67" lly="-218" urx="133" ury="782"/>
+      <char name="braceleft" width="480" llx="100" lly="-181" urx="350" ury="680"/>
+      <char name="braceright" width="480" llx="130" lly="-181" urx="380" ury="680"/>
+      <char name="bracketleft" width="333" llx="88" lly="-156" urx="299" ury="662"/>
+      <char name="bracketright" width="333" llx="34" lly="-156" urx="245" ury="662"/>
+      <char name="breve" width="333" llx="26" lly="507" urx="307" ury="664"/>
+      <char name="brokenbar" width="200" llx="67" lly="-143" urx="133" ury="707"/>
+      <char name="bullet" width="350" llx="40" lly="196" urx="310" ury="466"/>
+      <char name="c" width="444" llx="25" lly="-10" urx="412" ury="460"/>
+      <char name="caron" width="333" llx="11" lly="507" urx="322" ury="674"/>
+      <char name="ccedilla" width="444" llx="25" lly="-215" urx="412" ury="460"/>
+      <char name="cedilla" width="333" llx="52" lly="-215" urx="261" ury="0"/>
+      <char name="cent" width="500" llx="53" lly="-138" urx="448" ury="579"/>
+      <char name="circumflex" width="333" llx="11" lly="507" urx="322" ury="674"/>
+      <char name="colon" width="278" llx="81" lly="-11" urx="192" ury="459"/>
+      <char name="comma" width="250" llx="56" lly="-141" urx="195" ury="102"/>
+      <char name="copyright" width="760" llx="38" lly="-14" urx="722" ury="676"/>
+      <char name="currency" width="500" llx="-22" lly="58" urx="522" ury="602"/>
+      <char name="d" width="500" llx="27" lly="-10" urx="491" ury="683"/>
+      <char name="dagger" width="500" llx="59" lly="-149" urx="442" ury="676"/>
+      <char name="daggerdbl" width="500" llx="58" lly="-153" urx="442" ury="676"/>
+      <char name="degree" width="400" llx="57" lly="390" urx="343" ury="676"/>
+      <char name="dieresis" width="333" llx="18" lly="581" urx="315" ury="681"/>
+      <char name="divide" width="564" llx="30" lly="-10" urx="534" ury="516"/>
+      <char name="dollar" width="500" llx="44" lly="-87" urx="457" ury="727"/>
+      <char name="dotaccent" width="333" llx="118" lly="581" urx="216" ury="681"/>
+      <char name="dotlessi" width="278" llx="16" lly="0" urx="253" ury="460"/>
+      <char name="e" width="444" llx="25" lly="-10" urx="424" ury="460"/>
+      <char name="eacute" width="444" llx="25" lly="-10" urx="424" ury="678"/>
+      <char name="ecircumflex" width="444" llx="25" lly="-10" urx="424" ury="674"/>
+      <char name="edieresis" width="444" llx="25" lly="-10" urx="424" ury="623"/>
+      <char name="egrave" width="444" llx="25" lly="-10" urx="424" ury="678"/>
+      <char name="eight" width="500" llx="56" lly="-14" urx="445" ury="676"/>
+      <char name="ellipsis" width="1000" llx="111" lly="-11" urx="888" ury="100"/>
+      <char name="emdash" width="1000" llx="0" lly="201" urx="1000" ury="250"/>
+      <char name="endash" width="500" llx="0" lly="201" urx="500" ury="250"/>
+      <char name="equal" width="564" llx="30" lly="120" urx="534" ury="386"/>
+      <char name="eth" width="500" llx="29" lly="-10" urx="471" ury="686"/>
+      <char name="exclam" width="333" llx="130" lly="-9" urx="238" ury="676"/>
+      <char name="exclamdown" width="333" llx="97" lly="-218" urx="205" ury="467"/>
+      <char name="f" width="333" llx="20" lly="0" urx="383" ury="683"/>
+      <char name="fi" width="556" llx="31" lly="0" urx="521" ury="683"/>
+      <char name="five" width="500" llx="32" lly="-14" urx="438" ury="688"/>
+      <char name="fl" width="556" llx="32" lly="0" urx="521" ury="683"/>
+      <char name="florin" width="500" llx="7" lly="-189" urx="490" ury="676"/>
+      <char name="four" width="500" llx="12" lly="0" urx="472" ury="676"/>
+      <char name="fraction" width="167" llx="-168" lly="-14" urx="331" ury="676"/>
+      <char name="g" width="500" llx="28" lly="-218" urx="470" ury="460"/>
+      <char name="germandbls" width="500" llx="12" lly="-9" urx="468" ury="683"/>
+      <char name="grave" width="333" llx="19" lly="507" urx="242" ury="678"/>
+      <char name="greater" width="564" llx="28" lly="-8" urx="536" ury="514"/>
+      <char name="guillemotleft" width="500" llx="42" lly="33" urx="456" ury="416"/>
+      <char name="guillemotright" width="500" llx="44" lly="33" urx="458" ury="416"/>
+      <char name="guilsinglleft" width="333" llx="63" lly="33" urx="285" ury="416"/>
+      <char name="guilsinglright" width="333" llx="48" lly="33" urx="270" ury="416"/>
+      <char name="h" width="500" llx="9" lly="0" urx="487" ury="683"/>
+      <char name="hungarumlaut" width="333" llx="-3" lly="507" urx="377" ury="678"/>
+      <char name="hyphen" width="333" llx="39" lly="194" urx="285" ury="257"/>
+      <char name="i" width="278" llx="16" lly="0" urx="253" ury="683"/>
+      <char name="iacute" width="278" llx="16" lly="0" urx="290" ury="678"/>
+      <char name="icircumflex" width="278" llx="-16" lly="0" urx="295" ury="674"/>
+      <char name="idieresis" width="278" llx="-9" lly="0" urx="288" ury="623"/>
+      <char name="igrave" width="278" llx="-8" lly="0" urx="253" ury="678"/>
+      <char name="j" width="278" llx="-70" lly="-218" urx="194" ury="683"/>
+      <char name="k" width="500" llx="7" lly="0" urx="505" ury="683"/>
+      <char name="l" width="278" llx="19" lly="0" urx="257" ury="683"/>
+      <char name="less" width="564" llx="28" lly="-8" urx="536" ury="514"/>
+      <char name="logicalnot" width="564" llx="30" lly="108" urx="534" ury="386"/>
+      <char name="lslash" width="278" llx="19" lly="0" urx="259" ury="683"/>
+      <char name="m" width="778" llx="16" lly="0" urx="775" ury="460"/>
+      <char name="macron" width="333" llx="11" lly="547" urx="322" ury="601"/>
+      <char name="minus" width="324" llx="30" lly="220" urx="534" ury="286"/>
+      <char name="mu" width="500" llx="36" lly="-218" urx="512" ury="450"/>
+      <char name="multiply" width="564" llx="38" lly="8" urx="527" ury="497"/>
+      <char name="n" width="500" llx="16" lly="0" urx="485" ury="460"/>
+      <char name="nine" width="500" llx="30" lly="-22" urx="459" ury="676"/>
+      <char name="ntilde" width="500" llx="16" lly="0" urx="485" ury="638"/>
+      <char name="numbersign" width="500" llx="5" lly="0" urx="496" ury="662"/>
+      <char name="o" width="500" llx="29" lly="-10" urx="470" ury="460"/>
+      <char name="oacute" width="500" llx="29" lly="-10" urx="470" ury="678"/>
+      <char name="ocircumflex" width="500" llx="29" lly="-10" urx="470" ury="674"/>
+      <char name="odieresis" width="500" llx="29" lly="-10" urx="470" ury="623"/>
+      <char name="oe" width="722" llx="30" lly="-10" urx="690" ury="460"/>
+      <char name="ogonek" width="333" llx="62" lly="-165" urx="243" ury="0"/>
+      <char name="ograve" width="500" llx="29" lly="-10" urx="470" ury="678"/>
+      <char name="one" width="500" llx="111" lly="0" urx="394" ury="676"/>
+      <char name="onehalf" width="750" llx="31" lly="-14" urx="746" ury="676"/>
+      <char name="onequarter" width="750" llx="37" lly="-14" urx="718" ury="676"/>
+      <char name="onesuperior" width="300" llx="57" lly="270" urx="248" ury="676"/>
+      <char name="ordfeminine" width="276" llx="4" lly="394" urx="270" ury="676"/>
+      <char name="ordmasculine" width="310" llx="6" lly="394" urx="304" ury="676"/>
+      <char name="oslash" width="500" llx="29" lly="-112" urx="470" ury="551"/>
+      <char name="otilde" width="500" llx="29" lly="-10" urx="470" ury="638"/>
+      <char name="p" width="500" llx="5" lly="-217" urx="470" ury="460"/>
+      <char name="paragraph" width="453" llx="-22" lly="-154" urx="450" ury="662"/>
+      <char name="parenleft" width="333" llx="48" lly="-177" urx="304" ury="676"/>
+      <char name="parenright" width="333" llx="29" lly="-177" urx="285" ury="676"/>
+      <char name="percent" width="833" llx="61" lly="-13" urx="772" ury="676"/>
+      <char name="period" width="250" llx="70" lly="-11" urx="181" ury="100"/>
+      <char name="periodcentered" width="250" llx="70" lly="199" urx="181" ury="310"/>
+      <char name="perthousand" width="1000" llx="7" lly="-19" urx="994" ury="706"/>
+      <char name="plus" width="564" llx="30" lly="0" urx="534" ury="506"/>
+      <char name="plusminus" width="564" llx="30" lly="0" urx="534" ury="506"/>
+      <char name="q" width="500" llx="24" lly="-217" urx="488" ury="460"/>
+      <char name="question" width="444" llx="68" lly="-8" urx="414" ury="676"/>
+      <char name="questiondown" width="444" llx="30" lly="-218" urx="376" ury="466"/>
+      <char name="quotedbl" width="408" llx="77" lly="431" urx="331" ury="676"/>
+      <char name="quotedblbase" width="444" llx="45" lly="-141" urx="416" ury="102"/>
+      <char name="quotedblleft" width="444" llx="43" lly="433" urx="414" ury="676"/>
+      <char name="quotedblright" width="444" llx="30" lly="433" urx="401" ury="676"/>
+      <char name="quoteleft" width="333" llx="115" lly="433" urx="254" ury="676"/>
+      <char name="quoteright" width="333" llx="79" lly="433" urx="218" ury="676"/>
+      <char name="quotesinglbase" width="333" llx="79" lly="-141" urx="218" ury="102"/>
+      <char name="quotesingle" width="180" llx="48" lly="431" urx="133" ury="676"/>
+      <char name="r" width="333" llx="5" lly="0" urx="335" ury="460"/>
+      <char name="registered" width="760" llx="38" lly="-14" urx="722" ury="676"/>
+      <char name="ring" width="333" llx="67" lly="512" urx="266" ury="711"/>
+      <char name="s" width="389" llx="51" lly="-10" urx="348" ury="460"/>
+      <char name="scaron" width="389" llx="39" lly="-10" urx="350" ury="674"/>
+      <char name="section" width="500" llx="70" lly="-148" urx="426" ury="676"/>
+      <char name="semicolon" width="278" llx="80" lly="-141" urx="219" ury="459"/>
+      <char name="seven" width="500" llx="20" lly="-8" urx="449" ury="662"/>
+      <char name="six" width="500" llx="34" lly="-14" urx="468" ury="684"/>
+      <char name="slash" width="278" llx="-9" lly="-14" urx="287" ury="676"/>
+      <char name="space" width="250" llx="0" lly="0" urx="0" ury="0"/>
       <!-- JKT: the following has been manually added -->
-      <char name="nbsp" width="250"/>
-      <char name="sterling" width="500"/>
-      <char name="t" width="278"/>
-      <char name="thorn" width="500"/>
-      <char name="three" width="500"/>
-      <char name="threequarters" width="750"/>
-      <char name="threesuperior" width="300"/>
-      <char name="tilde" width="333"/>
-      <char name="trademark" width="980"/>
-      <char name="two" width="500"/>
-      <char name="twosuperior" width="300"/>
-      <char name="u" width="500"/>
-      <char name="uacute" width="500"/>
-      <char name="ucircumflex" width="500"/>
-      <char name="udieresis" width="500"/>
-      <char name="ugrave" width="500"/>
-      <char name="underscore" width="500"/>
-      <char name="v" width="500"/>
-      <char name="w" width="722"/>
-      <char name="x" width="500"/>
-      <char name="y" width="500"/>
-      <char name="yacute" width="500"/>
-      <char name="ydieresis" width="500"/>
-      <char name="yen" width="500"/>
-      <char name="z" width="444"/>
-      <char name="zcaron" width="444"/>
-      <char name="zero" width="500"/>
-   </widths>
+      <char name="sterling" width="500" llx="12" lly="-8" urx="490" ury="676"/>
+      <char name="t" width="278" llx="13" lly="-10" urx="279" ury="579"/>
+      <char name="thorn" width="500" llx="5" lly="-217" urx="470" ury="683"/>
+      <char name="three" width="500" llx="43" lly="-14" urx="431" ury="676"/>
+      <char name="threequarters" width="750" llx="15" lly="-14" urx="718" ury="676"/>
+      <char name="threesuperior" width="300" llx="15" lly="262" urx="291" ury="676"/>
+      <char name="tilde" width="333" llx="1" lly="532" urx="331" ury="638"/>
+      <char name="trademark" width="980" llx="30" lly="256" urx="957" ury="662"/>
+      <char name="two" width="500" llx="30" lly="0" urx="475" ury="676"/>
+      <char name="twosuperior" width="300" llx="1" lly="270" urx="296" ury="676"/>
+      <char name="u" width="500" llx="9" lly="-10" urx="479" ury="450"/>
+      <char name="uacute" width="500" llx="9" lly="-10" urx="479" ury="678"/>
+      <char name="ucircumflex" width="500" llx="9" lly="-10" urx="479" ury="674"/>
+      <char name="udieresis" width="500" llx="9" lly="-10" urx="479" ury="623"/>
+      <char name="ugrave" width="500" llx="9" lly="-10" urx="479" ury="678"/>
+      <char name="underscore" width="500" llx="0" lly="-125" urx="500" ury="-75"/>
+      <char name="v" width="500" llx="19" lly="-14" urx="477" ury="450"/>
+      <char name="w" width="722" llx="21" lly="-14" urx="694" ury="450"/>
+      <char name="x" width="500" llx="17" lly="0" urx="479" ury="450"/>
+      <char name="y" width="500" llx="14" lly="-218" urx="475" ury="450"/>
+      <char name="yacute" width="500" llx="14" lly="-218" urx="475" ury="678"/>
+      <char name="ydieresis" width="500" llx="14" lly="-218" urx="475" ury="623"/>
+      <char name="yen" width="500" llx="-53" lly="0" urx="512" ury="662"/>
+      <char name="z" width="444" llx="27" lly="0" urx="418" ury="450"/>
+      <char name="zcaron" width="444" llx="27" lly="0" urx="418" ury="674"/>
+      <char name="zero" width="500" llx="24" lly="-14" urx="476" ury="676"/>
+    </char-metrics>
   <kerning kpx1="79">
     <pair kern="-35" kpx2="65"/>
     <pair kern="-35" kpx2="87"/>

Modified: xmlgraphics/fop/trunk/src/codegen/fonts/ZapfDingbats.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/codegen/fonts/ZapfDingbats.xml?rev=1564017&r1=1564016&r2=1564017&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/codegen/fonts/ZapfDingbats.xml (original)
+++ xmlgraphics/fop/trunk/src/codegen/fonts/ZapfDingbats.xml Mon Feb  3 19:29:24 2014
@@ -21,214 +21,216 @@
   <family-name>ZapfDingbats</family-name>
   <class-name>ZapfDingbats</class-name>
   <encoding>ZapfDingbatsEncoding</encoding>
+   <underline-position>-100</underline-position>
+   <underline-thickness>50</underline-thickness>
   <cap-height>820</cap-height>
   <x-height>426</x-height>
   <ascender>820</ascender>
   <descender>-143</descender>
   <first-char>32</first-char>
   <last-char>255</last-char>
-  <widths>
-    <char name="space" width="278"/>
-    <char name="a1" width="974"/>
-    <char name="a2" width="961"/>
-    <char name="a202" width="974"/>
-    <char name="a3" width="980"/>
-    <char name="a4" width="719"/>
-    <char name="a5" width="789"/>
-    <char name="a119" width="790"/>
-    <char name="a118" width="791"/>
-    <char name="a117" width="690"/>
-    <char name="a11" width="960"/>
-    <char name="a12" width="939"/>
-    <char name="a13" width="549"/>
-    <char name="a14" width="855"/>
-    <char name="a15" width="911"/>
-    <char name="a16" width="933"/>
-    <char name="a105" width="911"/>
-    <char name="a17" width="945"/>
-    <char name="a18" width="974"/>
-    <char name="a19" width="755"/>
-    <char name="a20" width="846"/>
-    <char name="a21" width="762"/>
-    <char name="a22" width="761"/>
-    <char name="a23" width="571"/>
-    <char name="a24" width="677"/>
-    <char name="a25" width="763"/>
-    <char name="a26" width="760"/>
-    <char name="a27" width="759"/>
-    <char name="a28" width="754"/>
-    <char name="a6" width="494"/>
-    <char name="a7" width="552"/>
-    <char name="a8" width="537"/>
-    <char name="a9" width="577"/>
-    <char name="a10" width="692"/>
-    <char name="a29" width="786"/>
-    <char name="a30" width="788"/>
-    <char name="a31" width="788"/>
-    <char name="a32" width="790"/>
-    <char name="a33" width="793"/>
-    <char name="a34" width="794"/>
-    <char name="a35" width="816"/>
-    <char name="a36" width="823"/>
-    <char name="a37" width="789"/>
-    <char name="a38" width="841"/>
-    <char name="a39" width="823"/>
-    <char name="a40" width="833"/>
-    <char name="a41" width="816"/>
-    <char name="a42" width="831"/>
-    <char name="a43" width="923"/>
-    <char name="a44" width="744"/>
-    <char name="a45" width="723"/>
-    <char name="a46" width="749"/>
-    <char name="a47" width="790"/>
-    <char name="a48" width="792"/>
-    <char name="a49" width="695"/>
-    <char name="a50" width="776"/>
-    <char name="a51" width="768"/>
-    <char name="a52" width="792"/>
-    <char name="a53" width="759"/>
-    <char name="a54" width="707"/>
-    <char name="a55" width="708"/>
-    <char name="a56" width="682"/>
-    <char name="a57" width="701"/>
-    <char name="a58" width="826"/>
-    <char name="a59" width="815"/>
-    <char name="a60" width="789"/>
-    <char name="a61" width="789"/>
-    <char name="a62" width="707"/>
-    <char name="a63" width="687"/>
-    <char name="a64" width="696"/>
-    <char name="a65" width="689"/>
-    <char name="a66" width="786"/>
-    <char name="a67" width="787"/>
-    <char name="a68" width="713"/>
-    <char name="a69" width="791"/>
-    <char name="a70" width="785"/>
-    <char name="a71" width="791"/>
-    <char name="a72" width="873"/>
-    <char name="a73" width="761"/>
-    <char name="a74" width="762"/>
-    <char name="a203" width="762"/>
-    <char name="a75" width="759"/>
-    <char name="a204" width="759"/>
-    <char name="a76" width="892"/>
-    <char name="a77" width="892"/>
-    <char name="a78" width="788"/>
-    <char name="a79" width="784"/>
-    <char name="a81" width="438"/>
-    <char name="a82" width="138"/>
-    <char name="a83" width="277"/>
-    <char name="a84" width="415"/>
-    <char name="a97" width="392"/>
-    <char name="a98" width="392"/>
-    <char name="a99" width="668"/>
-    <char name="a100" width="668"/>
-    <char name="a101" width="732"/>
-    <char name="a102" width="544"/>
-    <char name="a103" width="544"/>
-    <char name="a104" width="910"/>
-    <char name="a106" width="667"/>
-    <char name="a107" width="760"/>
-    <char name="a108" width="760"/>
-    <char name="a112" width="776"/>
-    <char name="a111" width="595"/>
-    <char name="a110" width="694"/>
-    <char name="a109" width="626"/>
-    <char name="a120" width="788"/>
-    <char name="a121" width="788"/>
-    <char name="a122" width="788"/>
-    <char name="a123" width="788"/>
-    <char name="a124" width="788"/>
-    <char name="a125" width="788"/>
-    <char name="a126" width="788"/>
-    <char name="a127" width="788"/>
-    <char name="a128" width="788"/>
-    <char name="a129" width="788"/>
-    <char name="a130" width="788"/>
-    <char name="a131" width="788"/>
-    <char name="a132" width="788"/>
-    <char name="a133" width="788"/>
-    <char name="a134" width="788"/>
-    <char name="a135" width="788"/>
-    <char name="a136" width="788"/>
-    <char name="a137" width="788"/>
-    <char name="a138" width="788"/>
-    <char name="a139" width="788"/>
-    <char name="a140" width="788"/>
-    <char name="a141" width="788"/>
-    <char name="a142" width="788"/>
-    <char name="a143" width="788"/>
-    <char name="a144" width="788"/>
-    <char name="a145" width="788"/>
-    <char name="a146" width="788"/>
-    <char name="a147" width="788"/>
-    <char name="a148" width="788"/>
-    <char name="a149" width="788"/>
-    <char name="a150" width="788"/>
-    <char name="a151" width="788"/>
-    <char name="a152" width="788"/>
-    <char name="a153" width="788"/>
-    <char name="a154" width="788"/>
-    <char name="a155" width="788"/>
-    <char name="a156" width="788"/>
-    <char name="a157" width="788"/>
-    <char name="a158" width="788"/>
-    <char name="a159" width="788"/>
-    <char name="a160" width="894"/>
-    <char name="a161" width="838"/>
-    <char name="a163" width="1016"/>
-    <char name="a164" width="458"/>
-    <char name="a196" width="748"/>
-    <char name="a165" width="924"/>
-    <char name="a192" width="748"/>
-    <char name="a166" width="918"/>
-    <char name="a167" width="927"/>
-    <char name="a168" width="928"/>
-    <char name="a169" width="928"/>
-    <char name="a170" width="834"/>
-    <char name="a171" width="873"/>
-    <char name="a172" width="828"/>
-    <char name="a173" width="924"/>
-    <char name="a162" width="924"/>
-    <char name="a174" width="917"/>
-    <char name="a175" width="930"/>
-    <char name="a176" width="931"/>
-    <char name="a177" width="463"/>
-    <char name="a178" width="883"/>
-    <char name="a179" width="836"/>
-    <char name="a193" width="836"/>
-    <char name="a180" width="867"/>
-    <char name="a199" width="867"/>
-    <char name="a181" width="696"/>
-    <char name="a200" width="696"/>
-    <char name="a182" width="874"/>
-    <char name="a201" width="874"/>
-    <char name="a183" width="760"/>
-    <char name="a184" width="946"/>
-    <char name="a197" width="771"/>
-    <char name="a185" width="865"/>
-    <char name="a194" width="771"/>
-    <char name="a198" width="888"/>
-    <char name="a186" width="967"/>
-    <char name="a195" width="888"/>
-    <char name="a187" width="831"/>
-    <char name="a188" width="873"/>
-    <char name="a189" width="927"/>
-    <char name="a190" width="970"/>
-    <char name="a191" width="918"/>
-    <char name="a86" width="410"/>
-    <char name="a85" width="509"/>
-    <char name="a95" width="334"/>
-    <char name="a205" width="509"/>
-    <char name="a89" width="390"/>
-    <char name="a87" width="234"/>
-    <char name="a91" width="276"/>
-    <char name="a90" width="390"/>
-    <char name="a206" width="410"/>
-    <char name="a94" width="317"/>
-    <char name="a93" width="317"/>
-    <char name="a92" width="276"/>
-    <char name="a96" width="334"/>
-    <char name="a88" width="234"/>
-  </widths>
-</font-metrics>
\ No newline at end of file
+    <char-metrics>
+    <char name="space" width="278" llx="0" lly="0" urx="0" ury="0"/>
+    <char name="a1" width="974" llx="35" lly="72" urx="939" ury="621"/>
+    <char name="a2" width="961" llx="35" lly="81" urx="927" ury="611"/>
+    <char name="a202" width="974" llx="35" lly="72" urx="939" ury="621"/>
+    <char name="a3" width="980" llx="35" lly="0" urx="945" ury="692"/>
+    <char name="a4" width="719" llx="34" lly="139" urx="685" ury="566"/>
+    <char name="a5" width="789" llx="35" lly="-14" urx="755" ury="705"/>
+    <char name="a119" width="790" llx="35" lly="-14" urx="755" ury="705"/>
+    <char name="a118" width="791" llx="35" lly="-13" urx="761" ury="705"/>
+    <char name="a117" width="690" llx="34" lly="138" urx="655" ury="553"/>
+    <char name="a11" width="960" llx="35" lly="123" urx="925" ury="568"/>
+    <char name="a12" width="939" llx="35" lly="134" urx="904" ury="559"/>
+    <char name="a13" width="549" llx="29" lly="-11" urx="516" ury="705"/>
+    <char name="a14" width="855" llx="34" lly="59" urx="820" ury="632"/>
+    <char name="a15" width="911" llx="35" lly="50" urx="876" ury="642"/>
+    <char name="a16" width="933" llx="35" lly="139" urx="899" ury="550"/>
+    <char name="a105" width="911" llx="35" lly="50" urx="876" ury="642"/>
+    <char name="a17" width="945" llx="35" lly="139" urx="909" ury="553"/>
+    <char name="a18" width="974" llx="35" lly="104" urx="938" ury="587"/>
+    <char name="a19" width="755" llx="34" lly="-13" urx="721" ury="705"/>
+    <char name="a20" width="846" llx="36" lly="-14" urx="811" ury="705"/>
+    <char name="a21" width="762" llx="35" lly="0" urx="727" ury="692"/>
+    <char name="a22" width="761" llx="35" lly="0" urx="727" ury="692"/>
+    <char name="a23" width="571" llx="-1" lly="-68" urx="571" ury="661"/>
+    <char name="a24" width="677" llx="36" lly="-13" urx="642" ury="705"/>
+    <char name="a25" width="763" llx="35" lly="0" urx="728" ury="692"/>
+    <char name="a26" width="760" llx="35" lly="0" urx="726" ury="692"/>
+    <char name="a27" width="759" llx="35" lly="0" urx="725" ury="692"/>
+    <char name="a28" width="754" llx="35" lly="0" urx="720" ury="692"/>
+    <char name="a6" width="494" llx="35" lly="0" urx="460" ury="692"/>
+    <char name="a7" width="552" llx="35" lly="0" urx="517" ury="692"/>
+    <char name="a8" width="537" llx="35" lly="0" urx="503" ury="692"/>
+    <char name="a9" width="577" llx="35" lly="96" urx="542" ury="596"/>
+    <char name="a10" width="692" llx="35" lly="-14" urx="657" ury="705"/>
+    <char name="a29" width="786" llx="35" lly="-14" urx="751" ury="705"/>
+    <char name="a30" width="788" llx="35" lly="-14" urx="752" ury="705"/>
+    <char name="a31" width="788" llx="35" lly="-14" urx="753" ury="705"/>
+    <char name="a32" width="790" llx="35" lly="-14" urx="756" ury="705"/>
+    <char name="a33" width="793" llx="35" lly="-13" urx="759" ury="705"/>
+    <char name="a34" width="794" llx="35" lly="-13" urx="759" ury="705"/>
+    <char name="a35" width="816" llx="35" lly="-14" urx="782" ury="705"/>
+    <char name="a36" width="823" llx="35" lly="-14" urx="787" ury="705"/>
+    <char name="a37" width="789" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a38" width="841" llx="35" lly="-14" urx="807" ury="705"/>
+    <char name="a39" width="823" llx="35" lly="-14" urx="789" ury="705"/>
+    <char name="a40" width="833" llx="35" lly="-14" urx="798" ury="705"/>
+    <char name="a41" width="816" llx="35" lly="-13" urx="782" ury="705"/>
+    <char name="a42" width="831" llx="35" lly="-14" urx="796" ury="705"/>
+    <char name="a43" width="923" llx="35" lly="-14" urx="888" ury="705"/>
+    <char name="a44" width="744" llx="35" lly="0" urx="710" ury="692"/>
+    <char name="a45" width="723" llx="35" lly="0" urx="688" ury="692"/>
+    <char name="a46" width="749" llx="35" lly="0" urx="714" ury="692"/>
+    <char name="a47" width="790" llx="34" lly="-14" urx="756" ury="705"/>
+    <char name="a48" width="792" llx="35" lly="-14" urx="758" ury="705"/>
+    <char name="a49" width="695" llx="35" lly="-14" urx="661" ury="706"/>
+    <char name="a50" width="776" llx="35" lly="-6" urx="741" ury="699"/>
+    <char name="a51" width="768" llx="35" lly="-7" urx="734" ury="699"/>
+    <char name="a52" width="792" llx="35" lly="-14" urx="757" ury="705"/>
+    <char name="a53" width="759" llx="35" lly="0" urx="725" ury="692"/>
+    <char name="a54" width="707" llx="35" lly="-13" urx="672" ury="704"/>
+    <char name="a55" width="708" llx="35" lly="-14" urx="672" ury="705"/>
+    <char name="a56" width="682" llx="35" lly="-14" urx="647" ury="705"/>
+    <char name="a57" width="701" llx="35" lly="-14" urx="666" ury="705"/>
+    <char name="a58" width="826" llx="35" lly="-14" urx="791" ury="705"/>
+    <char name="a59" width="815" llx="35" lly="-14" urx="780" ury="705"/>
+    <char name="a60" width="789" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a61" width="789" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a62" width="707" llx="34" lly="-14" urx="673" ury="705"/>
+    <char name="a63" width="687" llx="36" lly="0" urx="651" ury="692"/>
+    <char name="a64" width="696" llx="35" lly="0" urx="661" ury="691"/>
+    <char name="a65" width="689" llx="35" lly="0" urx="655" ury="692"/>
+    <char name="a66" width="786" llx="34" lly="-14" urx="751" ury="705"/>
+    <char name="a67" width="787" llx="35" lly="-14" urx="752" ury="705"/>
+    <char name="a68" width="713" llx="35" lly="-14" urx="678" ury="705"/>
+    <char name="a69" width="791" llx="35" lly="-14" urx="756" ury="705"/>
+    <char name="a70" width="785" llx="36" lly="-14" urx="751" ury="705"/>
+    <char name="a71" width="791" llx="35" lly="-14" urx="757" ury="705"/>
+    <char name="a72" width="873" llx="35" lly="-14" urx="838" ury="705"/>
+    <char name="a73" width="761" llx="35" lly="0" urx="726" ury="692"/>
+    <char name="a74" width="762" llx="35" lly="0" urx="727" ury="692"/>
+    <char name="a203" width="762" llx="35" lly="0" urx="727" ury="692"/>
+    <char name="a75" width="759" llx="35" lly="0" urx="725" ury="692"/>
+    <char name="a204" width="759" llx="35" lly="0" urx="725" ury="692"/>
+    <char name="a76" width="892" llx="35" lly="0" urx="858" ury="705"/>
+    <char name="a77" width="892" llx="35" lly="-14" urx="858" ury="692"/>
+    <char name="a78" width="788" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a79" width="784" llx="35" lly="-14" urx="749" ury="705"/>
+    <char name="a81" width="438" llx="35" lly="-14" urx="403" ury="705"/>
+    <char name="a82" width="138" llx="35" lly="0" urx="104" ury="692"/>
+    <char name="a83" width="277" llx="35" lly="0" urx="242" ury="692"/>
+    <char name="a84" width="415" llx="35" lly="0" urx="380" ury="692"/>
+    <char name="a97" width="392" llx="35" lly="263" urx="357" ury="705"/>
+    <char name="a98" width="392" llx="34" lly="263" urx="357" ury="705"/>
+    <char name="a99" width="668" llx="35" lly="263" urx="633" ury="705"/>
+    <char name="a100" width="668" llx="36" lly="263" urx="634" ury="705"/>
+    <char name="a101" width="732" llx="35" lly="-143" urx="697" ury="806"/>
+    <char name="a102" width="544" llx="56" lly="-14" urx="488" ury="706"/>
+    <char name="a103" width="544" llx="34" lly="-14" urx="508" ury="705"/>
+    <char name="a104" width="910" llx="35" lly="40" urx="875" ury="651"/>
+    <char name="a106" width="667" llx="35" lly="-14" urx="633" ury="705"/>
+    <char name="a107" width="760" llx="35" lly="-14" urx="726" ury="705"/>
+    <char name="a108" width="760" llx="0" lly="121" urx="758" ury="569"/>
+    <char name="a112" width="776" llx="35" lly="0" urx="741" ury="705"/>
+    <char name="a111" width="595" llx="34" lly="-14" urx="560" ury="705"/>
+    <char name="a110" width="694" llx="35" lly="-14" urx="659" ury="705"/>
+    <char name="a109" width="626" llx="34" lly="0" urx="591" ury="705"/>
+    <char name="a120" width="788" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a121" width="788" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a122" width="788" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a123" width="788" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a124" width="788" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a125" width="788" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a126" width="788" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a127" width="788" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a128" width="788" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a129" width="788" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a130" width="788" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a131" width="788" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a132" width="788" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a133" width="788" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a134" width="788" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a135" width="788" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a136" width="788" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a137" width="788" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a138" width="788" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a139" width="788" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a140" width="788" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a141" width="788" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a142" width="788" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a143" width="788" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a144" width="788" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a145" width="788" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a146" width="788" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a147" width="788" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a148" width="788" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a149" width="788" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a150" width="788" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a151" width="788" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a152" width="788" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a153" width="788" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a154" width="788" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a155" width="788" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a156" width="788" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a157" width="788" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a158" width="788" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a159" width="788" llx="35" lly="-14" urx="754" ury="705"/>
+    <char name="a160" width="894" llx="35" lly="58" urx="860" ury="634"/>
+    <char name="a161" width="838" llx="35" lly="152" urx="803" ury="540"/>
+    <char name="a163" width="1016" llx="34" lly="152" urx="981" ury="540"/>
+    <char name="a164" width="458" llx="35" lly="-127" urx="422" ury="820"/>
+    <char name="a196" width="748" llx="35" lly="94" urx="698" ury="597"/>
+    <char name="a165" width="924" llx="35" lly="140" urx="890" ury="552"/>
+    <char name="a192" width="748" llx="35" lly="94" urx="698" ury="597"/>
+    <char name="a166" width="918" llx="35" lly="166" urx="884" ury="526"/>
+    <char name="a167" width="927" llx="35" lly="32" urx="892" ury="660"/>
+    <char name="a168" width="928" llx="35" lly="129" urx="891" ury="562"/>
+    <char name="a169" width="928" llx="35" lly="128" urx="893" ury="563"/>
+    <char name="a170" width="834" llx="35" lly="155" urx="799" ury="537"/>
+    <char name="a171" width="873" llx="35" lly="93" urx="838" ury="599"/>
+    <char name="a172" width="828" llx="35" lly="104" urx="791" ury="588"/>
+    <char name="a173" width="924" llx="35" lly="98" urx="889" ury="594"/>
+    <char name="a162" width="924" llx="35" lly="98" urx="889" ury="594"/>
+    <char name="a174" width="917" llx="35" lly="0" urx="882" ury="692"/>
+    <char name="a175" width="930" llx="35" lly="84" urx="896" ury="608"/>
+    <char name="a176" width="931" llx="35" lly="84" urx="896" ury="608"/>
+    <char name="a177" width="463" llx="35" lly="-99" urx="429" ury="791"/>
+    <char name="a178" width="883" llx="35" lly="71" urx="848" ury="623"/>
+    <char name="a179" width="836" llx="35" lly="44" urx="802" ury="648"/>
+    <char name="a193" width="836" llx="35" lly="44" urx="802" ury="648"/>
+    <char name="a180" width="867" llx="35" lly="101" urx="832" ury="591"/>
+    <char name="a199" width="867" llx="35" lly="101" urx="832" ury="591"/>
+    <char name="a181" width="696" llx="35" lly="44" urx="661" ury="648"/>
+    <char name="a200" width="696" llx="35" lly="44" urx="661" ury="648"/>
+    <char name="a182" width="874" llx="35" lly="77" urx="840" ury="619"/>
+    <char name="a201" width="874" llx="35" lly="73" urx="840" ury="615"/>
+    <char name="a183" width="760" llx="35" lly="0" urx="725" ury="692"/>
+    <char name="a184" width="946" llx="35" lly="160" urx="911" ury="533"/>
+    <char name="a197" width="771" llx="34" lly="37" urx="736" ury="655"/>
+    <char name="a185" width="865" llx="35" lly="207" urx="830" ury="481"/>
+    <char name="a194" width="771" llx="34" lly="37" urx="736" ury="655"/>
+    <char name="a198" width="888" llx="34" lly="-19" urx="853" ury="712"/>
+    <char name="a186" width="967" llx="35" lly="124" urx="932" ury="568"/>
+    <char name="a195" width="888" llx="34" lly="-19" urx="853" ury="712"/>
+    <char name="a187" width="831" llx="35" lly="113" urx="796" ury="579"/>
+    <char name="a188" width="873" llx="36" lly="118" urx="838" ury="578"/>
+    <char name="a189" width="927" llx="35" lly="150" urx="891" ury="542"/>
+    <char name="a190" width="970" llx="35" lly="76" urx="931" ury="616"/>
+    <char name="a191" width="918" llx="34" lly="99" urx="884" ury="593"/>
+    <char name="a86" width="410" llx="35" lly="0" urx="375" ury="692"/>
+    <char name="a85" width="509" llx="35" lly="0" urx="475" ury="692"/>
+    <char name="a95" width="334" llx="35" lly="0" urx="299" ury="692"/>
+    <char name="a205" width="509" llx="35" lly="0" urx="475" ury="692"/>
+    <char name="a89" width="390" llx="35" lly="-14" urx="356" ury="705"/>
+    <char name="a87" width="234" llx="35" lly="-14" urx="199" ury="705"/>
+    <char name="a91" width="276" llx="35" lly="0" urx="242" ury="692"/>
+    <char name="a90" width="390" llx="35" lly="-14" urx="355" ury="705"/>
+    <char name="a206" width="410" llx="35" lly="0" urx="375" ury="692"/>
+    <char name="a94" width="317" llx="35" lly="0" urx="283" ury="692"/>
+    <char name="a93" width="317" llx="35" lly="0" urx="283" ury="692"/>
+    <char name="a92" width="276" llx="35" lly="0" urx="242" ury="692"/>
+    <char name="a96" width="334" llx="35" lly="0" urx="299" ury="692"/>
+    <char name="a88" width="234" llx="35" lly="-14" urx="199" ury="705"/>
+    </char-metrics>
+</font-metrics>

Modified: xmlgraphics/fop/trunk/src/codegen/fonts/font-file.xsl
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/codegen/fonts/font-file.xsl?rev=1564017&r1=1564016&r2=1564017&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/codegen/fonts/font-file.xsl (original)
+++ xmlgraphics/fop/trunk/src/codegen/fonts/font-file.xsl Mon Feb  3 19:29:24 2014
@@ -35,6 +35,7 @@
   <xsl:template match="font-metrics">
 package org.apache.fop.fonts.base14;
 
+import java.awt.Rectangle;
 <xsl:if test="count(kerning) &gt; 0">
 import java.util.Map;
 </xsl:if>
@@ -42,12 +43,14 @@ import java.util.Set;
 import org.apache.fop.fonts.FontType;
 import org.apache.fop.fonts.Base14Font;
 import org.apache.fop.fonts.CodePointMapping;
-import org.apache.fop.fonts.Typeface;;
+import org.apache.fop.fonts.Typeface;
 
 public class <xsl:value-of select="class-name"/> extends Base14Font {
     private final static String fontName = "<xsl:value-of select="font-name"/>";
     private final static String fullName = "<xsl:value-of select="full-name"/>";
     private final static Set familyNames;
+    private final static int underlinePosition = <xsl:value-of select="underline-position"/>;
+    private final static int underlineThickness = <xsl:value-of select="underline-thickness"/>;
     private final static String encoding = "<xsl:value-of select="$encoding"/>";
     private final static int capHeight = <xsl:value-of select="cap-height"/>;
     private final static int xHeight = <xsl:value-of select="x-height"/>;
@@ -56,6 +59,7 @@ public class <xsl:value-of select="class
     private final static int firstChar = <xsl:value-of select="first-char"/>;
     private final static int lastChar = <xsl:value-of select="last-char"/>;
     private final static int[] width;
+    private final static Rectangle[] boundingBoxes;
     private final CodePointMapping mapping =
         CodePointMapping.getMapping("<xsl:value-of select="$encoding"/>");
 <xsl:if test="count(kerning) &gt; 0">
@@ -66,7 +70,8 @@ public class <xsl:value-of select="class
 
     static {
         width = new int[256];
-        <xsl:apply-templates select="widths"/>
+        boundingBoxes = new Rectangle[256];
+        <xsl:apply-templates select="char-metrics"/>
 <xsl:if test="count(kerning) &gt; 0">
         kerning = new java.util.HashMap();
         Integer first, second;
@@ -125,6 +130,14 @@ public class <xsl:value-of select="class
         return size * xHeight;
     }
 
+    public int getUnderlinePosition(int size) {
+        return size * underlinePosition;
+    }
+
+    public int getUnderlineThickness(int size) {
+        return size * underlineThickness;
+    }
+
     public int getFirstChar() {
         return firstChar;
     }
@@ -137,6 +150,11 @@ public class <xsl:value-of select="class
         return size * width[i];
     }
 
+    public Rectangle getBoundingBox(int glyphIndex, int size) {
+        Rectangle bbox = boundingBoxes[glyphIndex];
+        return new Rectangle(bbox.x * size, bbox.y * size, bbox.width * size, bbox.height * size);
+    }
+
     public int[] getWidths() {
         int[] arr = new int[getLastChar() - getFirstChar() + 1];
         System.arraycopy(width, getFirstChar(), arr, 0, getLastChar() - getFirstChar() + 1);
@@ -182,7 +200,9 @@ public class <xsl:value-of select="class
 }
   </xsl:template>
 
-  <xsl:template match="widths/char"><xsl:variable name="char-name" select="@name"/><xsl:variable name="char-num" select="$glyphs[@name = $char-name]/@codepoint"/><xsl:if test="$char-num!=''">        width[0x<xsl:value-of select="$char-num"/>] = <xsl:value-of select="@width"/>;</xsl:if></xsl:template>
+  <xsl:template match="char-metrics/char">
+    <xsl:variable name="char-name" select="@name"/><xsl:variable name="char-num" select="$glyphs[@name = $char-name]/@codepoint"/><xsl:if test="$char-num!=''">  width[0x<xsl:value-of select="$char-num"/>] = <xsl:value-of select="@width"/>;
+        boundingBoxes[0x<xsl:value-of select="$char-num"/>] = new Rectangle(<xsl:value-of select="@llx"/>,<xsl:value-of select="@lly"/>,<xsl:value-of select="@urx - @llx"/>,<xsl:value-of select="@ury - @lly"/>);</xsl:if></xsl:template>
   
   <xsl:template match="kerning">
         first = new Integer(<xsl:value-of select="@kpx1"/>);

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/AFPEventProducer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/AFPEventProducer.java?rev=1564017&r1=1564016&r2=1564017&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/AFPEventProducer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/AFPEventProducer.java Mon Feb  3 19:29:24 2014
@@ -122,4 +122,12 @@ public interface AFPEventProducer extend
      * @event.severity WARN
      */
     void charactersetMissingMetrics(Object source, char character, String charSet);
+
+    /**
+     * Double-byte fonts are not currently supported in SVG.
+     * @param source the event source
+     * @param fontFamily name of DB font
+     * @event.severity WARN
+     */
+    void invalidDBFontInSVG(Object source, String fontFamily);
 }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/fonts/AFPFont.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/fonts/AFPFont.java?rev=1564017&r1=1564016&r2=1564017&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/fonts/AFPFont.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/fonts/AFPFont.java Mon Feb  3 19:29:24 2014
@@ -19,6 +19,7 @@
 
 package org.apache.fop.afp.fonts;
 
+import java.awt.Rectangle;
 import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
@@ -34,6 +35,8 @@ import org.apache.fop.fonts.Typeface;
  */
 public abstract class AFPFont extends Typeface {
 
+    private static final double STRIKEOUT_POSITION_FACTOR = 0.45;
+
     /** The font name */
     protected final String name;
 
@@ -117,7 +120,34 @@ public abstract class AFPFont extends Ty
      */
     protected static final char toUnicodeCodepoint(int character) {
         //AFP fonts use Unicode directly as their mapped code points, so we can simply cast to char
-        return (char)character;
+        return (char) character;
+    }
+
+    /** {@inheritDoc} */
+    public int getUnderlineThickness(int size) {
+        // This is the FOCA recommendation in the absence of the Underline Thickness parameter
+        return getBoundingBox('-', size).height;
+    }
+
+    /** {@inheritDoc} */
+    public int getStrikeoutPosition(int size) {
+        //TODO This conflicts with the FOCA recommendation of 0 in the absence of the Throughscore Position
+        // parameter
+        return (int) (STRIKEOUT_POSITION_FACTOR * getCapHeight(size));
+    }
+
+    /** {@inheritDoc} */
+    public int getStrikeoutThickness(int size) {
+        // This is the FOCA recommendation in the absence of the Throughscore Thickness parameter
+        return getBoundingBox('-', size).height;
+    }
+
+    /** {@inheritDoc} */
+    public abstract Rectangle getBoundingBox(int glyphIndex, int size);
+
+    /** {@inheritDoc} */
+    public int[] getWidths() {
+        throw new UnsupportedOperationException();
     }
 
     /** {@inheritDoc} */

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/fonts/AbstractOutlineFont.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/fonts/AbstractOutlineFont.java?rev=1564017&r1=1564016&r2=1564017&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/fonts/AbstractOutlineFont.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/fonts/AbstractOutlineFont.java Mon Feb  3 19:29:24 2014
@@ -71,22 +71,6 @@ public abstract class AbstractOutlineFon
     }
 
     /**
-     * Get the first character in this font.
-     * @return the first character in this font
-     */
-    public int getFirstChar() {
-        return charSet.getFirstChar();
-    }
-
-    /**
-     * Get the last character in this font.
-     * @return the last character in this font
-     */
-    public int getLastChar() {
-        return charSet.getLastChar();
-    }
-
-    /**
      * The ascender is the part of a lowercase letter that extends above the
      * "x-height" (the height of the letter "x"), such as "d", "t", or "h". Also
      * used to denote the part of the letter extending above the x-height.
@@ -98,6 +82,17 @@ public abstract class AbstractOutlineFon
         return charSet.getAscender() * size;
     }
 
+    /** {@inheritDoc} */
+    public int getUnderlinePosition(int size) {
+        return charSet.getUnderscorePosition() * size;
+    }
+
+    @Override
+    public int getUnderlineThickness(int size) {
+        int underscoreWidth = charSet.getUnderscoreWidth();
+        return underscoreWidth == 0 ? super.getUnderlineThickness(size) : underscoreWidth * size;
+    }
+
     /**
      * Obtains the height of capital letters for the specified point size.
      *
@@ -130,40 +125,7 @@ public abstract class AbstractOutlineFon
         return charSet.getXHeight() * size;
     }
 
-    /**
-     * Obtain the width of the character for the specified point size.
-     * @param character the character
-     * @param size the font size (in mpt)
-     * @return the width of the character for the specified point size
-     */
-    public int getWidth(int character, int size) {
-        return charSet.getWidth(toUnicodeCodepoint(character)) * size;
-    }
 
-    /**
-     * Get the getWidth (in 1/1000ths of a point size) of all characters in this
-     * character set.
-     *
-     * @param size the font size (in mpt)
-     * @return the widths of all characters
-     */
-    public int[] getWidths(int size) {
-        int[] widths =  charSet.getWidths();
-        for (int i = 0; i < widths.length; i++) {
-            widths[i] = widths[i] * size;
-        }
-        return widths;
-    }
-
-    /**
-     * Get the getWidth (in 1/1000ths of a point size) of all characters in this
-     * character set.
-     *
-     * @return the widths of all characters
-     */
-    public int[] getWidths() {
-        return getWidths(1000);
-    }
 
     /** {@inheritDoc} */
     public boolean hasChar(char c) {

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/fonts/CharacterSet.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/fonts/CharacterSet.java?rev=1564017&r1=1564016&r2=1564017&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/fonts/CharacterSet.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/fonts/CharacterSet.java Mon Feb  3 19:29:24 2014
@@ -19,10 +19,9 @@
 
 package org.apache.fop.afp.fonts;
 
+import java.awt.Rectangle;
 import java.io.UnsupportedEncodingException;
 import java.nio.charset.CharacterCodingException;
-import java.util.HashMap;
-import java.util.Map;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -63,6 +62,8 @@ public class CharacterSet {
 
     private static final int MAX_NAME_LEN = 8;
 
+    /** The current orientation (currently only 0 is supported by FOP) */
+    public static final int SUPPORTED_ORIENTATION = 0;
 
     /** The code page to which the character set relates */
     protected final String codePage;
@@ -79,11 +80,8 @@ public class CharacterSet {
     /** The path to the installed fonts */
     private final AFPResourceAccessor accessor;
 
-    /** The current orientation (currently only 0 is supported by FOP) */
-    private final String currentOrientation = "0";
-
     /** The collection of objects for each orientation */
-    private final Map<String, CharacterSetOrientation> characterSetOrientations;
+    private CharacterSetOrientation characterSetOrientation;
 
     /** The nominal vertical size (in millipoints) for bitmap fonts. 0 for outline fonts. */
     private int nominalVerticalSize;
@@ -116,8 +114,6 @@ public class CharacterSet {
         this.encoding = encoding;
         this.encoder = charsetType.getEncoder(encoding);
         this.accessor = accessor;
-
-        this.characterSetOrientations = new HashMap<String, CharacterSetOrientation>(4);
     }
 
      // right pad short names with space
@@ -131,7 +127,9 @@ public class CharacterSet {
      * @param cso the metrics for the orientation
      */
     public void addCharacterSetOrientation(CharacterSetOrientation cso) {
-        characterSetOrientations.put(String.valueOf(cso.getOrientation()), cso);
+        if (cso.getOrientation() == SUPPORTED_ORIENTATION) {
+            characterSetOrientation = cso;
+        }
     }
 
     /**
@@ -165,11 +163,24 @@ public class CharacterSet {
      * @return the ascender value in millipoints
      */
     public int getAscender() {
-
         return getCharacterSetOrientation().getAscender();
     }
 
     /**
+     * TODO
+     */
+    public int getUnderscoreWidth() {
+        return getCharacterSetOrientation().getUnderscoreWidth();
+    }
+
+    /**
+     * TODO
+     */
+    public int getUnderscorePosition() {
+        return getCharacterSetOrientation().getUnderscorePosition();
+    }
+
+    /**
      * Cap height is the average height of the uppercase characters in
      * a font. This value is specified by the designer of a font and is
      * usually the height of the uppercase M.
@@ -177,7 +188,6 @@ public class CharacterSet {
      * @return the cap height value in millipoints
      */
     public int getCapHeight() {
-
         return getCharacterSetOrientation().getCapHeight();
     }
 
@@ -194,24 +204,6 @@ public class CharacterSet {
     }
 
     /**
-     * Returns the first character in the character set
-     *
-     * @return the first character in the character set (Unicode codepoint)
-     */
-    public char getFirstChar() {
-        return getCharacterSetOrientation().getFirstChar();
-    }
-
-    /**
-     * Returns the last character in the character set
-     *
-     * @return the last character in the character set (Unicode codepoint)
-     */
-    public char getLastChar() {
-        return getCharacterSetOrientation().getLastChar();
-    }
-
-    /**
      * Returns the resource accessor to load the font resources with.
      * @return the resource accessor to load the font resources with
      */
@@ -220,16 +212,6 @@ public class CharacterSet {
     }
 
     /**
-     * Get the width (in 1/1000ths of a point size) of all characters
-     *
-     * @return the widths of all characters
-     */
-    public int[] getWidths() {
-
-        return getCharacterSetOrientation().getWidths();
-    }
-
-    /**
      * XHeight refers to the height of the lower case letters above the baseline.
      *
      * @return the typical height of characters
@@ -246,11 +228,13 @@ public class CharacterSet {
      * @param character the Unicode character from which the width will be calculated
      * @return the width of the character
      */
-    public int getWidth(char character) {
-        return getCharacterSetOrientation().getWidth(character);
+    public int getWidth(char character, int size) {
+        return getCharacterSetOrientation().getWidth(character, size);
     }
 
-
+    public Rectangle getCharacterBox(char character, int size) {
+        return getCharacterSetOrientation().getCharacterBox(character, size);
+    }
 
     /**
      * Returns the AFP character set identifier
@@ -309,9 +293,7 @@ public class CharacterSet {
      * @return characterSetOrentation The current orientation metrics.
      */
     private CharacterSetOrientation getCharacterSetOrientation() {
-        CharacterSetOrientation c
-            = characterSetOrientations.get(currentOrientation);
-        return c;
+        return characterSetOrientation;
     }
 
     /**

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/fonts/CharacterSetBuilder.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/fonts/CharacterSetBuilder.java?rev=1564017&r1=1564016&r2=1564017&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/fonts/CharacterSetBuilder.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/fonts/CharacterSetBuilder.java Mon Feb  3 19:29:24 2014
@@ -19,6 +19,7 @@
 
 package org.apache.fop.afp.fonts;
 
+import java.awt.Rectangle;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.MalformedURLException;
@@ -292,16 +293,14 @@ public abstract class CharacterSetBuilde
                     metricNormalizationFactor = 1000.0d * 72000.0d
                         / fontDescriptor.getNominalFontSizeInMillipoints() / dpi;
                 }
-
+                ValueNormalizer normalizer = new ValueNormalizer(metricNormalizationFactor);
                 //process D3AC89 Font Position
-                processFontPosition(structuredFieldReader, characterSetOrientations,
-                        metricNormalizationFactor);
-
+                processFontPosition(structuredFieldReader, characterSetOrientations, normalizer);
                 //process D38C89 Font Index (per orientation)
                 for (int i = 0; i < characterSetOrientations.length; i++) {
-                    processFontIndex(structuredFieldReader,
-                            characterSetOrientations[i], codePage, metricNormalizationFactor);
-                    characterSet.addCharacterSetOrientation(characterSetOrientations[i]);
+                    CharacterSetOrientation characterSetOrientation = characterSetOrientations[i];
+                    processFontIndex(structuredFieldReader, characterSetOrientation, codePage, normalizer);
+                    characterSet.addCharacterSetOrientation(characterSetOrientation);
                 }
             } else {
                 throw new IOException("Missing D3AE89 Font Control structured field.");
@@ -314,6 +313,19 @@ public abstract class CharacterSetBuilde
         return characterSet;
     }
 
+    private static class ValueNormalizer {
+
+        private final double factor;
+
+        public ValueNormalizer(double factor) {
+            this.factor = factor;
+        }
+
+        public int normalize(int value) {
+            return (int) Math.round(value *  factor);
+        }
+    }
+
     /**
      * Load the code page information from the appropriate file. The file name
      * to load is determined by the code page name and the file extension 'CDP'.
@@ -475,7 +487,7 @@ public abstract class CharacterSetBuilde
      * @throws IOException if an I/O exception of some sort has occurred.
      */
     private void processFontPosition(StructuredFieldReader structuredFieldReader,
-        CharacterSetOrientation[] characterSetOrientations, double metricNormalizationFactor)
+        CharacterSetOrientation[] characterSetOrientations, ValueNormalizer normalizer)
             throws IOException {
 
         byte[] data = structuredFieldReader.getNext(FONT_POSITION_SF);
@@ -493,48 +505,34 @@ public abstract class CharacterSetBuilde
                 if (position == 9) {
                     CharacterSetOrientation characterSetOrientation
                             = characterSetOrientations[characterSetOrientationIndex];
-
                     int xHeight = getSBIN(fpData, 2);
                     int capHeight = getSBIN(fpData, 4);
                     int ascHeight = getSBIN(fpData, 6);
                     int dscHeight = getSBIN(fpData, 8);
-
                     dscHeight = dscHeight * -1;
-
-                    characterSetOrientation.setXHeight(
-                            (int)Math.round(xHeight * metricNormalizationFactor));
-                    characterSetOrientation.setCapHeight(
-                            (int)Math.round(capHeight * metricNormalizationFactor));
-                    characterSetOrientation.setAscender(
-                            (int)Math.round(ascHeight * metricNormalizationFactor));
-                    characterSetOrientation.setDescender(
-                            (int)Math.round(dscHeight * metricNormalizationFactor));
+                    int underscoreWidth = getUBIN(fpData, 17);
+                    int underscorePosition = getSBIN(fpData, 20);
+                    characterSetOrientation.setXHeight(normalizer.normalize(xHeight));
+                    characterSetOrientation.setCapHeight(normalizer.normalize(capHeight));
+                    characterSetOrientation.setAscender(normalizer.normalize(ascHeight));
+                    characterSetOrientation.setDescender(normalizer.normalize(dscHeight));
+                    characterSetOrientation.setUnderscoreWidth(normalizer.normalize(underscoreWidth));
+                    characterSetOrientation.setUnderscorePosition(normalizer.normalize(underscorePosition));
                 }
             } else if (position == 22) {
                 position = 0;
                 characterSetOrientationIndex++;
                 fpData[position] = data[index];
             }
-
             position++;
         }
 
     }
 
-    /**
-     * Process the font index details for the character set orientation.
-     *
-     * @param structuredFieldReader the structured field reader
-     * @param cso the CharacterSetOrientation object to populate
-     * @param codepage the map of code pages
-     * @param metricNormalizationFactor factor to apply to the metrics to get normalized
-     *                  font metric values
-     * @throws IOException if an I/O exception of some sort has occurred.
-     */
-    private void processFontIndex(StructuredFieldReader structuredFieldReader,
-            CharacterSetOrientation cso, Map<String, String> codepage,
-            double metricNormalizationFactor)
-        throws IOException {
+
+    private void processFontIndex(StructuredFieldReader structuredFieldReader, CharacterSetOrientation cso,
+            Map<String, String> codepage, ValueNormalizer normalizer)
+            throws IOException {
 
         byte[] data = structuredFieldReader.getNext(FONT_INDEX_SF);
 
@@ -543,8 +541,6 @@ public abstract class CharacterSetBuilde
         byte[] gcgid = new byte[8];
         byte[] fiData = new byte[20];
 
-        char lowest = 255;
-        char highest = 0;
         String firstABCMismatch = null;
 
         // Read data, ignoring bytes 0 - 2
@@ -569,13 +565,15 @@ public abstract class CharacterSetBuilde
 
                     char cidx = idx.charAt(0);
                     int width = getUBIN(fiData, 0);
+                    int ascendHt = getSBIN(fiData, 2);
+                    int descendDp = getSBIN(fiData, 4);
                     int a = getSBIN(fiData, 10);
                     int b = getUBIN(fiData, 12);
                     int c = getSBIN(fiData, 14);
                     int abc = a + b + c;
                     int diff = Math.abs(abc - width);
                     if (diff != 0 && width != 0) {
-                        double diffPercent = 100 * diff / (double)width;
+                        double diffPercent = 100 * diff / (double) width;
                         if (diffPercent > 2) {
                             if (LOG.isTraceEnabled()) {
                                 LOG.trace(gcgiString + ": "
@@ -587,27 +585,16 @@ public abstract class CharacterSetBuilde
                             }
                         }
                     }
-
-                    if (cidx < lowest) {
-                        lowest = cidx;
-                    }
-
-                    if (cidx > highest) {
-                        highest = cidx;
-                    }
-
-                    int normalizedWidth = (int)Math.round(width * metricNormalizationFactor);
-
-                    cso.setWidth(cidx, normalizedWidth);
-
+                    int normalizedWidth = normalizer.normalize(width);
+                    int x0 = normalizer.normalize(a);
+                    int y0 = normalizer.normalize(-descendDp);
+                    int dx = normalizer.normalize(b);
+                    int dy = normalizer.normalize(ascendHt + descendDp);
+                    cso.setCharacterMetrics(cidx, normalizedWidth, new Rectangle(x0, y0, dx, dy));
                 }
-
             }
         }
 
-        cso.setFirstChar(lowest);
-        cso.setLastChar(highest);
-
         if (LOG.isDebugEnabled() && firstABCMismatch != null) {
             //Debug level because it usually is no problem.
             LOG.debug("Font has metrics inconsitencies where A+B+C doesn't equal the"

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/fonts/CharacterSetOrientation.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/fonts/CharacterSetOrientation.java?rev=1564017&r1=1564016&r2=1564017&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/fonts/CharacterSetOrientation.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/fonts/CharacterSetOrientation.java Mon Feb  3 19:29:24 2014
@@ -19,7 +19,7 @@
 
 package org.apache.fop.afp.fonts;
 
-import java.util.Arrays;
+import java.awt.Rectangle;
 
 /**
  * The IBM Font Object Content Architecture (FOCA) supports presentation
@@ -60,23 +60,13 @@ public class CharacterSetOrientation {
     /**
      * The character widths in the character set (indexed using Unicode codepoints)
      */
-    private int[] charsWidths;
+    private IntegerKeyStore<CharacterMetrics> characterMetrics;
 
     /**
      * The height of lowercase letters
      */
     private int xHeight;
 
-    /**
-     * The first character (Unicode codepoint)
-     */
-    private char firstChar;
-
-    /**
-     * The last character (Unicode codepoint)
-     */
-    private char lastChar;
-
     /** The character set orientation */
     private final int orientation;
     /** space increment */
@@ -86,6 +76,10 @@ public class CharacterSetOrientation {
     /** Nominal Character Increment */
     private final int nomCharIncrement;
 
+    private int underscoreWidth;
+
+    private int underscorePosition;
+
     /**
      * Constructor for the CharacterSetOrientation, the orientation is
      * expressed as the degrees rotation (i.e 0, 90, 180, 270)
@@ -97,8 +91,7 @@ public class CharacterSetOrientation {
         this.spaceIncrement = spaceIncrement;
         this.emSpaceIncrement = emSpaceIncrement;
         this.nomCharIncrement = nomCharIncrement;
-        charsWidths = new int[256];
-        Arrays.fill(charsWidths, -1);
+        this.characterMetrics = new IntegerKeyStore<CharacterMetrics>();
     }
 
     /**
@@ -138,19 +131,17 @@ public class CharacterSetOrientation {
     }
 
     /**
-     * The first character in the character set
-     * @return the first character (Unicode codepoint)
+     * TODO
      */
-    public char getFirstChar() {
-        return firstChar;
+    public int getUnderscoreWidth() {
+        return underscoreWidth;
     }
 
     /**
-     * The last character in the character set
-     * @return the last character (Unicode codepoint)
+     * TODO
      */
-    public char getLastChar() {
-        return lastChar;
+    public int getUnderscorePosition() {
+        return underscorePosition;
     }
 
     /**
@@ -162,17 +153,6 @@ public class CharacterSetOrientation {
     }
 
     /**
-     * Get the width (in 1/1000ths of a point size) of all characters
-     * in this character set.
-     * @return the widths of all characters
-     */
-    public int[] getWidths() {
-        int[] arr = new int[(getLastChar() - getFirstChar()) + 1];
-        System.arraycopy(charsWidths, getFirstChar(), arr, 0, (getLastChar() - getFirstChar()) + 1);
-        return arr;
-    }
-
-    /**
      * XHeight refers to the height of the lower case letters above
      * the baseline.
      * @return heightX the typical height of characters
@@ -187,13 +167,38 @@ public class CharacterSetOrientation {
      * @param character the Unicode character to evaluate
      * @return the widths of the character
      */
-    public int getWidth(char character) {
-        if (character >= charsWidths.length) {
-            throw new IllegalArgumentException("Invalid character: "
-                    + character + " (" + Integer.toString(character)
-                    + "), maximum is " + (charsWidths.length - 1));
+    public int getWidth(char character, int size) {
+        CharacterMetrics cm = getCharacterMetrics(character);
+        return cm == null ? -1 : size * cm.width;
+    }
+
+    private CharacterMetrics getCharacterMetrics(char character) {
+        return characterMetrics.get((int) character);
+    }
+
+    /**
+     * Get the character box (rectangle with dimensions in 1/1000ths of a point size) of the character
+     * identified by the parameter passed.
+     * @param character the Unicode character to evaluate
+     * @return the character box
+     */
+    public Rectangle getCharacterBox(char character, int size) {
+        CharacterMetrics cm = getCharacterMetrics(character);
+        return scale(cm == null ? getFallbackCharacterBox() : cm.characterBox, size);
+    }
+
+    private static Rectangle scale(Rectangle rectangle, int size) {
+        if (rectangle == null) {
+            return null;
+        } else {
+        return new Rectangle((int) (size * rectangle.getX()), (int) (size * rectangle.getY()),
+                (int) (size * rectangle.getWidth()), (int) (size * rectangle.getHeight()));
         }
-        return charsWidths[character];
+    }
+
+    private Rectangle getFallbackCharacterBox() {
+        // TODO replace with something sensible
+        return new Rectangle(0, 0, 0, 0);
     }
 
     /**
@@ -233,19 +238,19 @@ public class CharacterSetOrientation {
     }
 
     /**
-     * The first character in the character set
-     * @param firstChar the first character
+     * TODO
+     * @param underscoreWidth the underscore width value in millipoints
      */
-    public void setFirstChar(char firstChar) {
-        this.firstChar = firstChar;
+    public void setUnderscoreWidth(int underscoreWidth) {
+        this.underscoreWidth = underscoreWidth;
     }
 
     /**
-     * The last character in the character set
-     * @param lastChar the last character
+     * TODO
+     * @param underscorePosition the underscore position value in millipoints
      */
-    public void setLastChar(char lastChar) {
-        this.lastChar = lastChar;
+    public void setUnderscorePosition(int underscorePosition) {
+        this.underscorePosition = underscorePosition;
     }
 
     /**
@@ -254,17 +259,8 @@ public class CharacterSetOrientation {
      * @param character the Unicode character for which the width is being set
      * @param width the widths of the character
      */
-    public void setWidth(char character, int width) {
-        if (character >= charsWidths.length) {
-            // Increase the size of the array if necessary
-            //  TODO Can we remove firstChar? surely firstChar==0 at this stage?
-            int[] arr = new int[(character - firstChar) + 1];
-            System.arraycopy(charsWidths, 0, arr, 0, charsWidths.length);
-            Arrays.fill(arr, charsWidths.length, character - firstChar, -1);
-            charsWidths = arr;
-        }
-        charsWidths[character] = width;
-
+    public void setCharacterMetrics(char character, int width, Rectangle characterBox) {
+        characterMetrics.put((int) character, new CharacterMetrics(width, characterBox));
     }
 
     /**
@@ -299,4 +295,16 @@ public class CharacterSetOrientation {
     public int getNominalCharIncrement() {
         return this.nomCharIncrement;
     }
+
+    private static class CharacterMetrics {
+
+        public final int width;
+
+        public final Rectangle characterBox;
+
+        public CharacterMetrics(int width, Rectangle characterBox) {
+            this.width = width;
+            this.characterBox = characterBox;
+        }
+    }
 }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/fonts/DoubleByteFont.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/fonts/DoubleByteFont.java?rev=1564017&r1=1564016&r2=1564017&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/fonts/DoubleByteFont.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/fonts/DoubleByteFont.java Mon Feb  3 19:29:24 2014
@@ -19,6 +19,7 @@
 
 package org.apache.fop.afp.fonts;
 
+import java.awt.Rectangle;
 import java.lang.Character.UnicodeBlock;
 import java.util.HashSet;
 import java.util.Set;
@@ -68,7 +69,7 @@ public class DoubleByteFont extends Abst
     public int getWidth(int character, int size) {
         int charWidth;
         try {
-            charWidth = charSet.getWidth(toUnicodeCodepoint(character));
+            charWidth = charSet.getWidth(toUnicodeCodepoint(character), size);
         } catch (IllegalArgumentException e) {
             if (!charsProcessed.contains(character)) {
                 charsProcessed.add(character);
@@ -80,9 +81,9 @@ public class DoubleByteFont extends Abst
         }
 
         if (charWidth == -1) {
-            charWidth = getDefaultCharacterWidth(character);
+            charWidth = getDefaultCharacterWidth(character) * size;
         }
-        return charWidth * size;
+        return charWidth;
     }
 
     private int getDefaultCharacterWidth(int character) {
@@ -94,6 +95,33 @@ public class DoubleByteFont extends Abst
         }
     }
 
+    @Override
+    public Rectangle getBoundingBox(int character, int size) {
+        Rectangle characterBox = getBoundingBoxOrNull(character, size);
+        if (characterBox == null) {
+            characterBox = getDefaultCharacterBox(character, size);
+        }
+        return characterBox;
+    }
+
+    private Rectangle getBoundingBoxOrNull(int character, int size) {
+        Rectangle characterBox = null;
+        try {
+            characterBox = charSet.getCharacterBox(toUnicodeCodepoint(character), size);
+        } catch (IllegalArgumentException e) {
+            if (!charsProcessed.contains(character)) {
+                charsProcessed.add(character);
+                getAFPEventProducer().charactersetMissingMetrics(this, (char) character,
+                        charSet.getName().trim());
+            }
+        }
+        return characterBox;
+    }
+
+    private Rectangle getDefaultCharacterBox(int character, int size) {
+        return getBoundingBoxOrNull('-', size);
+    }
+
     private int inferCharWidth(int character) {
 
         //Is this character an ideograph?

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/fonts/FopCharacterSet.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/fonts/FopCharacterSet.java?rev=1564017&r1=1564016&r2=1564017&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/fonts/FopCharacterSet.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/fonts/FopCharacterSet.java Mon Feb  3 19:29:24 2014
@@ -19,6 +19,8 @@
 
 package org.apache.fop.afp.fonts;
 
+import java.awt.Rectangle;
+
 import org.apache.fop.afp.AFPEventProducer;
 import org.apache.fop.afp.util.AFPResourceAccessor;
 import org.apache.fop.fonts.Typeface;
@@ -84,45 +86,31 @@ public class FopCharacterSet extends Cha
     }
 
     /**
-     * The first character in the character set
-     * @return the first character
+     * XHeight refers to the height of the lower case letters above the baseline.
+     * @return the typical height of characters
      */
-    public char getFirstChar() {
-        return 0;
+    public int getXHeight() {
+        return charSet.getXHeight(1);
     }
 
-    /**
-     * The last character in the character set
-     * @return the last character
-     */
-    public char getLastChar() {
-        return 0;
+    @Override
+    public int getWidth(char character, int size) {
+        return charSet.getWidth(character, size);
     }
 
-    /**
-     * Get the width (in 1/1000ths of a point size) of all characters
-     * @return the widths of all characters
-     */
-    public int[] getWidths() {
-        return charSet.getWidths();
-    }
+    @Override
+    public Rectangle getCharacterBox(char character, int size) {
+        return charSet.getBoundingBox(character, size);
+    };
 
-    /**
-     * XHeight refers to the height of the lower case letters above the baseline.
-     * @return the typical height of characters
-     */
-    public int getXHeight() {
-        return charSet.getXHeight(1);
+    @Override
+    public int getUnderscoreWidth() {
+        return charSet.getUnderlineThickness(1);
     }
 
-    /**
-     * Get the width (in 1/1000ths of a point size) of the character
-     * identified by the parameter passed.
-     * @param character the character from which the width will be calculated
-     * @return the width of the character
-     */
-    public int getWidth(char character) {
-        return charSet.getWidth(character, 1);
+    @Override
+    public int getUnderscorePosition() {
+        return charSet.getUnderlinePosition(1);
     }
 
     /**



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org