Java Doc for TTFontParser.java in  » PDF » jPod » de » intarsys » font » truetype » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » PDF » jPod » de.intarsys.font.truetype 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   de.intarsys.font.truetype.TTFontParser

TTFontParser
public class TTFontParser (Code)
Apple TT specification http://developer.apple.com/fonts/TTRefMan/RM06/Chap6.html



Constructor Summary
public  TTFontParser()
    

Method Summary
public  MapparseTable_cmap(TTTable data)
    
public  MapparseTable_cmap_subtable(TTTable data)
    
public  TTFontHeaderparseTable_head(TTTable data)
     This table gives global information about the font.
public  TTHorizontalHeaderparseTable_hhea(TTTable data)
    
 FIXED        Table version number        0x00010000 for version 1.0.
 FWORD        Ascender        Typographic ascent.
 FWORD        Descender        Typographic descent.
 FWORD        LineGap        Typographic line gap.
public  int[]parseTable_hmtx(TTTable data, int count)
    
 The type longHorMetric is defined as an array where each element has
 two parts: the advance width, which is of type USHORT, and the left side
 bearing, which is of type SHORT.
public  int[]parseTable_loca(TTTable data, boolean shortLocationFormat)
    
public  TTNamingparseTable_name(TTTable data)
    
public  TTMetricsparseTable_os2(TTTable data)
    
public  TTPostScriptInformationparseTable_post(TTTable data)
    
 Type         Name                 Description
 Fixed         Version         0x00010000 for version 1.0
 0x00020000 for version 2.0
 0x00025000 for version 2.5 (deprecated)
 0x00030000 for version 3.0
 Fixed         italicAngle         Italic angle in counter-clockwise degrees from the vertical.
public  TTTable[]parseTables(TTFont font)
    
protected  byte[]readBytes(IRandomAccess random, int count)
    
protected  MapreadCMapFormat0(IRandomAccess random)
    
protected  MapreadCMapFormat4(IRandomAccess random)
    
protected  MapreadCMapFormat6(IRandomAccess random)
    
protected  floatreadFixed(IRandomAccess random)
    
protected  intreadInt(IRandomAccess random)
    
protected  TTNameRecordreadNameRecord(IRandomAccess random, int stringTableOffset)
    
protected  shortreadShort(IRandomAccess random)
    
protected  TTTablereadTable(TTFont font, IRandomAccess random)
    
protected  voidreadTables(TTFont font, IRandomAccess random)
    
protected  longreadUInt(IRandomAccess random)
    
protected  intreadUShort(IRandomAccess random)
    


Constructor Detail
TTFontParser
public TTFontParser()(Code)




Method Detail
parseTable_cmap
public Map parseTable_cmap(TTTable data) throws IOException(Code)



parseTable_cmap_subtable
public Map parseTable_cmap_subtable(TTTable data) throws IOException(Code)



parseTable_head
public TTFontHeader parseTable_head(TTTable data) throws IOException(Code)
This table gives global information about the font.
 Type        Name        Description
 FIXED        Table version number        0x00010000 for version 1.0.
 FIXED        fontRevision        Set by font manufacturer.
 ULONG        checkSumAdjustment        To compute:  set it to 0, sum the entire font as ULONG, then store 0xB1B0AFBA - sum.
 ULONG        magicNumber        Set to 0x5F0F3CF5.
 USHORT        flags        Bit 0 - baseline for font at y=0;
 Bit 1 - left sidebearing at x=0;
 Bit 2 - instructions may depend on point size;
 Bit 3 - force ppem to integer values for all internal scaler math; may use fractional ppem sizes if this bit is clear;
 Bit 4 - instructions may alter advance width (the advance widths might not scale linearly);
 Note: All other bits must be zero.
 USHORT        unitsPerEm        Valid range is from 16 to 16384
 longDateTime        created        International date (8-byte field).
 longDateTime        modified        International date (8-byte field).
 FWORD        xMin        For all glyph bounding boxes.
 FWORD        yMin        For all glyph bounding boxes.
 FWORD        xMax        For all glyph bounding boxes.
 FWORD        yMax        For all glyph bounding boxes.
 USHORT        macStyle        Bit 0 bold (if set to 1); Bit 1 italic (if set to 1)Bits 2-15 reserved (set to 0).
 USHORT        lowestRecPPEM        Smallest readable size in pixels.
 SHORT        fontDirectionHint         0   Fully mixed directional glyphs; 1   Only strongly left to right; 2   Like 1 but also contains neutrals ;-1   Only strongly right to left;-2   Like -1 but also contains neutrals.
 SHORT        indexToLocFormat        0 for short offsets, 1 for long.
 SHORT        glyphDataFormat        0 for current format.
 

Parameters:
  data - docme docme
throws:
  IOException - docme



parseTable_hhea
public TTHorizontalHeader parseTable_hhea(TTTable data) throws IOException(Code)
 FIXED        Table version number        0x00010000 for version 1.0.
 FWORD        Ascender        Typographic ascent.
 FWORD        Descender        Typographic descent.
 FWORD        LineGap        Typographic line gap. Negative LineGap values are treated as zero in Windows 3.1, System 6, and System 7.
 UFWORD        advanceWidthMax        Maximum advance width value in ‘hmtx’ table.
 FWORD        minLeftSideBearing        Minimum left sidebearing value in ‘hmtx’ table.
 FWORD        minRightSideBearing        Minimum right sidebearing value; calculated as Min(aw - lsb - (xMax - xMin)).
 FWORD        xMaxExtent        Max(lsb + (xMax - xMin)).
 SHORT        caretSlopeRise        Used to calculate the slope of the cursor (rise/run); 1 for vertical.
 SHORT        caretSlopeRun        0 for vertical.
 SHORT        (reserved)        set to 0
 SHORT        (reserved)        set to 0
 SHORT        (reserved)        set to 0
 SHORT        (reserved)        set to 0
 SHORT        (reserved)        set to 0
 SHORT        metricDataFormat        0 for current format.
 USHORT        numberOfHMetrics        Number of hMetric entries in  ‘hmtx’ table; may be smaller than the total number of glyphs in the font.
 

Parameters:
  data - docme docme
throws:
  IOException - docme



parseTable_hmtx
public int[] parseTable_hmtx(TTTable data, int count) throws IOException(Code)
 The type longHorMetric is defined as an array where each element has
 two parts: the advance width, which is of type USHORT, and the left side
 bearing, which is of type SHORT. These fields are in font design units.
 typedef struct         _longHorMetric {
 USHORT        advanceWidth;
 SHORT                lsb;
 }  longHorMetric;
 Field Type Description
 hMetrics longHorMetric [numberOfHMetrics] Paired advance width and
 left side bearing values for each glyph. The value
 numOfHMetrics comes from the 'hhea' table. If the font is
 monospaced, only one entry need be in the array, but that
 entry is required. The last entry applies to all subsequent
 glyphs.
 leftSideBearing SHORT[ ] Here the advanceWidth is assumed to be the
 same as the advanceWidth for the last entry above. The
 number of entries in this array is derived from numGlyphs
 (from 'maxp' table) minus numberOfHMetrics. This generally
 is used with a run of monospaced glyphs (e.g., Kanji fonts
 or Courier fonts). Only one run is allowed and it must be
 at the end. This allows a monospaced font to vary the left
 side bearing values for each glyph.
 

Parameters:
  data - docme
Parameters:
  count - docme docme
throws:
  IOException - docme



parseTable_loca
public int[] parseTable_loca(TTTable data, boolean shortLocationFormat) throws IOException(Code)



parseTable_name
public TTNaming parseTable_name(TTTable data) throws IOException(Code)



parseTable_os2
public TTMetrics parseTable_os2(TTTable data) throws IOException(Code)
 USHORT        version        0x0001
 SHORT        xAvgCharWidth;
 USHORT        usWeightClass;
 USHORT        usWidthClass;
 SHORT        fsType;
 SHORT        ySubscriptXSize;
 SHORT        ySubscriptYSize;
 SHORT        ySubscriptXOffset;
 SHORT        ySubscriptYOffset;
 SHORT        ySuperscriptXSize;
 SHORT        ySuperscriptYSize;
 SHORT        ySuperscriptXOffset;
 SHORT        ySuperscriptYOffset;
 SHORT        yStrikeoutSize;
 SHORT        yStrikeoutPosition;
 SHORT        sFamilyClass;
 PANOSE        panose;
 ULONG        ulUnicodeRange1        Bits 0–31
 ULONG        ulUnicodeRange2        Bits 32–63
 ULONG        ulUnicodeRange3        Bits 64–95
 ULONG        ulUnicodeRange4        Bits 96–127
 CHAR        achVendID[4];
 USHORT        fsSelection;
 USHORT        usFirstCharIndex
 USHORT        usLastCharIndex
 USHORT        sTypoAscender
 USHORT        sTypoDescender
 USHORT        sTypoLineGap
 USHORT        usWinAscent
 USHORT        usWinDescent
 ULONG        ulCodePageRange1        Bits 0-31
 ULONG        ulCodePageRange2        Bits 32-63
 SHORT                  sxHeight
 SHORT                 sCapHeight
 USHORT                 usDefaultChar
 USHORT                 usBreakChar
 USHORT                 usMaxContext
 

Parameters:
  data - docme docme
throws:
  IOException - docme



parseTable_post
public TTPostScriptInformation parseTable_post(TTTable data) throws IOException(Code)
 Type         Name                 Description
 Fixed         Version         0x00010000 for version 1.0
 0x00020000 for version 2.0
 0x00025000 for version 2.5 (deprecated)
 0x00030000 for version 3.0
 Fixed         italicAngle         Italic angle in counter-clockwise degrees from the vertical. Zero for upright text, negative for text that leans to the right (forward).
 FWord         underlinePosition         This is the suggested distance of the top of the underline from the baseline (negative values indicate below baseline).
 The PostScript definition of this FontInfo dictionary key (the y coordinate of the center of the stroke) is not used for historical reasons. The value of the PostScript key may be calculated by subtracting half the underlineThickness from the value of this field.
 FWord         underlineThickness         Suggested values for the underline thickness.
 ULONG         isFixedPitch         Set to 0 if the font is proportionally spaced, non-zero if the font is not proportionally spaced (i.e. monospaced).
 ULONG         minMemType42         Minimum memory usage when an OpenType font is downloaded.
 ULONG         maxMemType42         Maximum memory usage when an OpenType font is downloaded.
 ULONG         minMemType1         Minimum memory usage when an OpenType font is downloaded as a Type 1 font.
 ULONG         maxMemType1         Maximum memory usage when an OpenType font is downloaded as a Type 1 font.
 

Parameters:
  data - docme docme
throws:
  IOException - docme



parseTables
public TTTable[] parseTables(TTFont font) throws IOException(Code)



readBytes
protected byte[] readBytes(IRandomAccess random, int count) throws IOException(Code)



readCMapFormat0
protected Map readCMapFormat0(IRandomAccess random) throws IOException(Code)



readCMapFormat4
protected Map readCMapFormat4(IRandomAccess random) throws IOException(Code)



readCMapFormat6
protected Map readCMapFormat6(IRandomAccess random) throws IOException(Code)



readFixed
protected float readFixed(IRandomAccess random) throws IOException(Code)



readInt
protected int readInt(IRandomAccess random) throws IOException(Code)



readNameRecord
protected TTNameRecord readNameRecord(IRandomAccess random, int stringTableOffset) throws IOException(Code)



readShort
protected short readShort(IRandomAccess random) throws IOException(Code)



readTable
protected TTTable readTable(TTFont font, IRandomAccess random) throws IOException(Code)



readTables
protected void readTables(TTFont font, IRandomAccess random) throws IOException(Code)



readUInt
protected long readUInt(IRandomAccess random) throws IOException(Code)



readUShort
protected int readUShort(IRandomAccess random) throws IOException(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.