aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Schweinsberg <[email protected]>2019-09-09 11:14:05 -0700
committerGitHub <[email protected]>2019-09-09 11:14:05 -0700
commit93146f57a126dc187377f4d2a754293f7a12ef2d (patch)
tree8f46f8204ab08ca44aa42c7b38695d22d39b065e
parentfc3383d430ffcb313c155d31a1116fa846ff28d4 (diff)
parent38f203140f966bb8ed0b379643a7530784d7edb4 (diff)
Merge pull request #10 from dcsch/split-up
Reduced to library-only code
-rw-r--r--.gitignore3
-rw-r--r--.idea/$PRODUCT_WORKSPACE_FILE$19
-rw-r--r--.idea/compiler.xml13
-rw-r--r--.idea/misc.xml10
-rw-r--r--.idea/modules.xml8
-rw-r--r--pom.xml58
-rw-r--r--src/images/Typecast.gifbin4985 -> 0 bytes
-rw-r--r--src/images/crosshair_16x16.gifbin853 -> 0 bytes
-rw-r--r--src/images/cursor_16x16.gifbin863 -> 0 bytes
-rw-r--r--src/images/point_and_cursor_16.gifbin881 -> 0 bytes
-rw-r--r--src/images/point_selected_16.gifbin837 -> 0 bytes
-rw-r--r--src/main/java/net/java/dev/typecast/cff/CffFont.java (renamed from src/net/java/dev/typecast/cff/CffFont.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/cff/CffStandardStrings.java (renamed from src/net/java/dev/typecast/cff/CffStandardStrings.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/cff/Charset.java (renamed from src/net/java/dev/typecast/cff/Charset.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/cff/CharsetFormat0.java (renamed from src/net/java/dev/typecast/cff/CharsetFormat0.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/cff/CharsetFormat1.java (renamed from src/net/java/dev/typecast/cff/CharsetFormat1.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/cff/CharsetFormat2.java (renamed from src/net/java/dev/typecast/cff/CharsetFormat2.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/cff/CharsetRange.java (renamed from src/net/java/dev/typecast/cff/CharsetRange.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/cff/CharsetRange1.java (renamed from src/net/java/dev/typecast/cff/CharsetRange1.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/cff/CharsetRange2.java (renamed from src/net/java/dev/typecast/cff/CharsetRange2.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/cff/Charstring.java (renamed from src/net/java/dev/typecast/cff/Charstring.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/cff/CharstringType2.java (renamed from src/net/java/dev/typecast/cff/CharstringType2.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/cff/Dict.java (renamed from src/net/java/dev/typecast/cff/Dict.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/cff/Index.java (renamed from src/net/java/dev/typecast/cff/Index.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/cff/NameIndex.java (renamed from src/net/java/dev/typecast/cff/NameIndex.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/cff/StringIndex.java (renamed from src/net/java/dev/typecast/cff/StringIndex.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/cff/T2Interpreter.java (renamed from src/net/java/dev/typecast/cff/T2Interpreter.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/cff/T2Mnemonic.java (renamed from src/net/java/dev/typecast/cff/T2Mnemonic.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/cff/TopDictIndex.java (renamed from src/net/java/dev/typecast/cff/TopDictIndex.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/exchange/Exporter.java (renamed from src/net/java/dev/typecast/exchange/Exporter.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/exchange/Messages.java (renamed from src/net/java/dev/typecast/exchange/Messages.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/exchange/Messages.properties (renamed from src/net/java/dev/typecast/exchange/Messages.properties)0
-rw-r--r--src/main/java/net/java/dev/typecast/exchange/SVGExporter.java (renamed from src/net/java/dev/typecast/exchange/SVGExporter.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/Disassembler.java (renamed from src/net/java/dev/typecast/ot/Disassembler.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/Fixed.java (renamed from src/net/java/dev/typecast/ot/Fixed.java)2
-rw-r--r--src/main/java/net/java/dev/typecast/ot/Glyph.java (renamed from src/net/java/dev/typecast/ot/Glyph.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/Mnemonic.java (renamed from src/net/java/dev/typecast/ot/Mnemonic.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/OTFont.java (renamed from src/net/java/dev/typecast/ot/OTFont.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/OTFontCollection.java (renamed from src/net/java/dev/typecast/ot/OTFontCollection.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/Point.java (renamed from src/net/java/dev/typecast/ot/Point.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/T2Glyph.java (renamed from src/net/java/dev/typecast/ot/T2Glyph.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/TTGlyph.java (renamed from src/net/java/dev/typecast/ot/TTGlyph.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/mac/ResourceData.java (renamed from src/net/java/dev/typecast/ot/mac/ResourceData.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/mac/ResourceFile.java (renamed from src/net/java/dev/typecast/ot/mac/ResourceFile.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/mac/ResourceHeader.java (renamed from src/net/java/dev/typecast/ot/mac/ResourceHeader.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/mac/ResourceMap.java (renamed from src/net/java/dev/typecast/ot/mac/ResourceMap.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/mac/ResourceReference.java (renamed from src/net/java/dev/typecast/ot/mac/ResourceReference.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/mac/ResourceType.java (renamed from src/net/java/dev/typecast/ot/mac/ResourceType.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/BaseTable.java (renamed from src/net/java/dev/typecast/ot/table/BaseTable.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/CffTable.java (renamed from src/net/java/dev/typecast/ot/table/CffTable.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/ClassDef.java (renamed from src/net/java/dev/typecast/ot/table/ClassDef.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/ClassDefFormat1.java (renamed from src/net/java/dev/typecast/ot/table/ClassDefFormat1.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/ClassDefFormat2.java (renamed from src/net/java/dev/typecast/ot/table/ClassDefFormat2.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/CmapFormat.java (renamed from src/net/java/dev/typecast/ot/table/CmapFormat.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/CmapFormat0.java (renamed from src/net/java/dev/typecast/ot/table/CmapFormat0.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/CmapFormat12.java (renamed from src/net/java/dev/typecast/ot/table/CmapFormat12.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/CmapFormat2.java (renamed from src/net/java/dev/typecast/ot/table/CmapFormat2.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/CmapFormat4.java (renamed from src/net/java/dev/typecast/ot/table/CmapFormat4.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/CmapFormat6.java (renamed from src/net/java/dev/typecast/ot/table/CmapFormat6.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/CmapFormatUnknown.java (renamed from src/net/java/dev/typecast/ot/table/CmapFormatUnknown.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/CmapIndexEntry.java (renamed from src/net/java/dev/typecast/ot/table/CmapIndexEntry.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/CmapTable.java (renamed from src/net/java/dev/typecast/ot/table/CmapTable.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/ColrTable.java (renamed from src/net/java/dev/typecast/ot/table/ColrTable.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/Coverage.java (renamed from src/net/java/dev/typecast/ot/table/Coverage.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/CoverageFormat1.java (renamed from src/net/java/dev/typecast/ot/table/CoverageFormat1.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/CoverageFormat2.java (renamed from src/net/java/dev/typecast/ot/table/CoverageFormat2.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/CpalTable.java (renamed from src/net/java/dev/typecast/ot/table/CpalTable.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/CvtTable.java (renamed from src/net/java/dev/typecast/ot/table/CvtTable.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/Device.java (renamed from src/net/java/dev/typecast/ot/table/Device.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/DirectoryEntry.java (renamed from src/net/java/dev/typecast/ot/table/DirectoryEntry.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/DsigEntry.java (renamed from src/net/java/dev/typecast/ot/table/DsigEntry.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/DsigTable.java (renamed from src/net/java/dev/typecast/ot/table/DsigTable.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/Feature.java (renamed from src/net/java/dev/typecast/ot/table/Feature.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/FeatureList.java (renamed from src/net/java/dev/typecast/ot/table/FeatureList.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/FeatureRecord.java (renamed from src/net/java/dev/typecast/ot/table/FeatureRecord.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/FeatureTags.java (renamed from src/net/java/dev/typecast/ot/table/FeatureTags.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/FpgmTable.java (renamed from src/net/java/dev/typecast/ot/table/FpgmTable.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/GaspRange.java (renamed from src/net/java/dev/typecast/ot/table/GaspRange.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/GaspTable.java (renamed from src/net/java/dev/typecast/ot/table/GaspTable.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/GdefTable.java (renamed from src/net/java/dev/typecast/ot/table/GdefTable.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/GlyfCompositeComp.java (renamed from src/net/java/dev/typecast/ot/table/GlyfCompositeComp.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/GlyfCompositeDescript.java (renamed from src/net/java/dev/typecast/ot/table/GlyfCompositeDescript.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/GlyfDescript.java (renamed from src/net/java/dev/typecast/ot/table/GlyfDescript.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/GlyfSimpleDescript.java (renamed from src/net/java/dev/typecast/ot/table/GlyfSimpleDescript.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/GlyfTable.java (renamed from src/net/java/dev/typecast/ot/table/GlyfTable.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/GlyphDescription.java (renamed from src/net/java/dev/typecast/ot/table/GlyphDescription.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/GposTable.java (renamed from src/net/java/dev/typecast/ot/table/GposTable.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/GsubTable.java (renamed from src/net/java/dev/typecast/ot/table/GsubTable.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/HdmxTable.java (renamed from src/net/java/dev/typecast/ot/table/HdmxTable.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/HeadTable.java (renamed from src/net/java/dev/typecast/ot/table/HeadTable.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/HheaTable.java (renamed from src/net/java/dev/typecast/ot/table/HheaTable.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/HmtxTable.java (renamed from src/net/java/dev/typecast/ot/table/HmtxTable.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/ID.java (renamed from src/net/java/dev/typecast/ot/table/ID.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/KernSubtable.java (renamed from src/net/java/dev/typecast/ot/table/KernSubtable.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/KernSubtableFormat0.java (renamed from src/net/java/dev/typecast/ot/table/KernSubtableFormat0.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/KernSubtableFormat2.java (renamed from src/net/java/dev/typecast/ot/table/KernSubtableFormat2.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/KernTable.java (renamed from src/net/java/dev/typecast/ot/table/KernTable.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/KerningPair.java (renamed from src/net/java/dev/typecast/ot/table/KerningPair.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/LangSys.java (renamed from src/net/java/dev/typecast/ot/table/LangSys.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/LangSysRecord.java (renamed from src/net/java/dev/typecast/ot/table/LangSysRecord.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/Ligature.java (renamed from src/net/java/dev/typecast/ot/table/Ligature.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/LigatureSet.java (renamed from src/net/java/dev/typecast/ot/table/LigatureSet.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/LigatureSubst.java (renamed from src/net/java/dev/typecast/ot/table/LigatureSubst.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/LigatureSubstFormat1.java (renamed from src/net/java/dev/typecast/ot/table/LigatureSubstFormat1.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/LocaTable.java (renamed from src/net/java/dev/typecast/ot/table/LocaTable.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/Lookup.java (renamed from src/net/java/dev/typecast/ot/table/Lookup.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/LookupList.java (renamed from src/net/java/dev/typecast/ot/table/LookupList.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/LookupSubtable.java (renamed from src/net/java/dev/typecast/ot/table/LookupSubtable.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/LookupSubtableFactory.java (renamed from src/net/java/dev/typecast/ot/table/LookupSubtableFactory.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/LtshTable.java (renamed from src/net/java/dev/typecast/ot/table/LtshTable.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/MaxpTable.java (renamed from src/net/java/dev/typecast/ot/table/MaxpTable.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/NameRecord.java (renamed from src/net/java/dev/typecast/ot/table/NameRecord.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/NameTable.java (renamed from src/net/java/dev/typecast/ot/table/NameTable.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/Os2Table.java (renamed from src/net/java/dev/typecast/ot/table/Os2Table.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/Panose.java (renamed from src/net/java/dev/typecast/ot/table/Panose.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/PcltTable.java (renamed from src/net/java/dev/typecast/ot/table/PcltTable.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/PostTable.java (renamed from src/net/java/dev/typecast/ot/table/PostTable.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/PrepTable.java (renamed from src/net/java/dev/typecast/ot/table/PrepTable.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/Program.java (renamed from src/net/java/dev/typecast/ot/table/Program.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/RangeRecord.java (renamed from src/net/java/dev/typecast/ot/table/RangeRecord.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/SbixTable.java (renamed from src/net/java/dev/typecast/ot/table/SbixTable.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/Script.java (renamed from src/net/java/dev/typecast/ot/table/Script.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/ScriptList.java (renamed from src/net/java/dev/typecast/ot/table/ScriptList.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/ScriptRecord.java (renamed from src/net/java/dev/typecast/ot/table/ScriptRecord.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/ScriptTags.java (renamed from src/net/java/dev/typecast/ot/table/ScriptTags.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/SignatureBlock.java (renamed from src/net/java/dev/typecast/ot/table/SignatureBlock.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/SingleSubst.java (renamed from src/net/java/dev/typecast/ot/table/SingleSubst.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/SingleSubstFormat1.java (renamed from src/net/java/dev/typecast/ot/table/SingleSubstFormat1.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/SingleSubstFormat2.java (renamed from src/net/java/dev/typecast/ot/table/SingleSubstFormat2.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/TTCHeader.java (renamed from src/net/java/dev/typecast/ot/table/TTCHeader.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/Table.java (renamed from src/net/java/dev/typecast/ot/table/Table.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/TableDirectory.java (renamed from src/net/java/dev/typecast/ot/table/TableDirectory.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/TableException.java (renamed from src/net/java/dev/typecast/ot/table/TableException.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/TableFactory.java (renamed from src/net/java/dev/typecast/ot/table/TableFactory.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/VdmxTable.java (renamed from src/net/java/dev/typecast/ot/table/VdmxTable.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/VheaTable.java (renamed from src/net/java/dev/typecast/ot/table/VheaTable.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/VmtxTable.java (renamed from src/net/java/dev/typecast/ot/table/VmtxTable.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/render/GlyphImageFactory.java (renamed from src/net/java/dev/typecast/render/GlyphImageFactory.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/render/GlyphPathFactory.java (renamed from src/net/java/dev/typecast/render/GlyphPathFactory.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/tt/engine/GraphicsState.java (renamed from src/net/java/dev/typecast/tt/engine/GraphicsState.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/tt/engine/Interpreter.java (renamed from src/net/java/dev/typecast/tt/engine/Interpreter.java)0
-rw-r--r--src/main/java/net/java/dev/typecast/tt/engine/Parser.java (renamed from src/net/java/dev/typecast/tt/engine/Parser.java)0
-rw-r--r--src/main/java/org/apache/batik/i18n/ExtendedLocalizable.java (renamed from src/org/apache/batik/i18n/ExtendedLocalizable.java)0
-rw-r--r--src/main/java/org/apache/batik/i18n/LocaleGroup.java (renamed from src/org/apache/batik/i18n/LocaleGroup.java)0
-rw-r--r--src/main/java/org/apache/batik/i18n/Localizable.java (renamed from src/org/apache/batik/i18n/Localizable.java)0
-rw-r--r--src/main/java/org/apache/batik/i18n/LocalizableSupport.java (renamed from src/org/apache/batik/i18n/LocalizableSupport.java)0
-rw-r--r--src/main/java/org/apache/batik/util/CSSConstants.java (renamed from src/org/apache/batik/util/CSSConstants.java)0
-rw-r--r--src/main/java/org/apache/batik/util/SVGConstants.java (renamed from src/org/apache/batik/util/SVGConstants.java)0
-rw-r--r--src/main/java/org/apache/batik/util/XMLConstants.java (renamed from src/org/apache/batik/util/XMLConstants.java)0
-rw-r--r--src/main/resources/logback.xml (renamed from resources/logback.xml)0
-rw-r--r--src/net/java/dev/typecast/app/editor/BitmapPanel.java63
-rw-r--r--src/net/java/dev/typecast/app/editor/DumpPanel.java56
-rw-r--r--src/net/java/dev/typecast/app/editor/EditorFileFilter.java264
-rw-r--r--src/net/java/dev/typecast/app/editor/EditorMenu.java643
-rw-r--r--src/net/java/dev/typecast/app/editor/EditorPrefs.java192
-rw-r--r--src/net/java/dev/typecast/app/editor/GlyphPanel.java101
-rw-r--r--src/net/java/dev/typecast/app/editor/GlyphPanelStatusBar.java131
-rw-r--r--src/net/java/dev/typecast/app/editor/GlyphPanelToolBar.java53
-rw-r--r--src/net/java/dev/typecast/app/editor/MacOSFilenameFilter.java93
-rw-r--r--src/net/java/dev/typecast/app/editor/Main.java427
-rw-r--r--src/net/java/dev/typecast/app/editor/Main.properties81
-rw-r--r--src/net/java/dev/typecast/app/editor/Splash.java51
-rw-r--r--src/net/java/dev/typecast/app/editor/TableTreeBuilder.java329
-rw-r--r--src/net/java/dev/typecast/app/editor/TableTreeCellRenderer.java89
-rw-r--r--src/net/java/dev/typecast/app/editor/TableTreeNode.java50
-rw-r--r--src/net/java/dev/typecast/app/framework/EditorView.java29
-rw-r--r--src/net/java/dev/typecast/edit/CharacterMap.java217
-rw-r--r--src/net/java/dev/typecast/edit/Command.java35
-rw-r--r--src/net/java/dev/typecast/edit/GlyphEdit.java339
-rw-r--r--src/net/java/dev/typecast/edit/PointTool.java110
-rw-r--r--src/net/java/dev/typecast/edit/SelectCommand.java39
-rw-r--r--src/net/java/dev/typecast/edit/Tool.java37
-rw-r--r--src/test/net/java/dev/typecast/ot/FixedTest.java55
-rw-r--r--typecast.iml13
174 files changed, 138 insertions, 3472 deletions
diff --git a/.gitignore b/.gitignore
index 89f9ac0..e08c794 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
-out/
+target/
+.DS_Store
diff --git a/.idea/$PRODUCT_WORKSPACE_FILE$ b/.idea/$PRODUCT_WORKSPACE_FILE$
deleted file mode 100644
index 79be354..0000000
--- a/.idea/$PRODUCT_WORKSPACE_FILE$
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
- <component name="masterDetails">
- <states>
- <state key="ProjectJDKs.UI">
- <settings>
- <last-edited>11</last-edited>
- <splitter-proportions>
- <option name="proportions">
- <list>
- <option value="0.2" />
- </list>
- </option>
- </splitter-proportions>
- </settings>
- </state>
- </states>
- </component>
-</project> \ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
new file mode 100644
index 0000000..fc8ac4f
--- /dev/null
+++ b/.idea/compiler.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="CompilerConfiguration">
+ <annotationProcessing>
+ <profile name="Maven default annotation processors profile" enabled="true">
+ <sourceOutputDir name="target/generated-sources/annotations" />
+ <sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
+ <outputRelativeToContentRoot value="true" />
+ <module name="typecast" />
+ </profile>
+ </annotationProcessing>
+ </component>
+</project> \ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 1763e15..6d752e8 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,6 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
- <component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="11" project-jdk-type="JavaSDK">
+ <component name="ExternalStorageConfigurationManager" enabled="true" />
+ <component name="MavenProjectsManager">
+ <option name="originalFiles">
+ <list>
+ <option value="$PROJECT_DIR$/pom.xml" />
+ </list>
+ </option>
+ </component>
+ <component name="ProjectRootManager" version="2" languageLevel="JDK_12" project-jdk-name="12" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project> \ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
deleted file mode 100644
index 40b4b4c..0000000
--- a/.idea/modules.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
- <component name="ProjectModuleManager">
- <modules>
- <module fileurl="file://$PROJECT_DIR$/typecast.iml" filepath="$PROJECT_DIR$/typecast.iml" />
- </modules>
- </component>
-</project> \ No newline at end of file
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..12460db
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,58 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>net.java.dev.typecast</groupId>
+ <artifactId>typecast</artifactId>
+ <packaging>jar</packaging>
+ <version>1.0-SNAPSHOT</version>
+ <name>typecast</name>
+ <url>https://github.com/dcsch/typecast</url>
+ <description>OpenType Font Library</description>
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <maven.compiler.source>1.7</maven.compiler.source>
+ <maven.compiler.target>1.7</maven.compiler.target>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.7.0</version>
+ <configuration>
+ <source>8</source>
+ <target>8</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.7.28</version>
+ </dependency>
+ </dependencies>
+ <licenses>
+ <license>
+ <name>Apache License, Version 2.0</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+ <developers>
+ <developer>
+ <name>David Schweinsberg</name>
+ <id>dcsch</id>
+ <email>[email protected]</email>
+ <url>github.com/dcsch</url>
+ <timezone>-8</timezone>
+ </developer>
+ </developers>
+</project>
diff --git a/src/images/Typecast.gif b/src/images/Typecast.gif
deleted file mode 100644
index be06124..0000000
--- a/src/images/Typecast.gif
+++ /dev/null
Binary files differ
diff --git a/src/images/crosshair_16x16.gif b/src/images/crosshair_16x16.gif
deleted file mode 100644
index 2f0d771..0000000
--- a/src/images/crosshair_16x16.gif
+++ /dev/null
Binary files differ
diff --git a/src/images/cursor_16x16.gif b/src/images/cursor_16x16.gif
deleted file mode 100644
index 5a3865e..0000000
--- a/src/images/cursor_16x16.gif
+++ /dev/null
Binary files differ
diff --git a/src/images/point_and_cursor_16.gif b/src/images/point_and_cursor_16.gif
deleted file mode 100644
index d2765c9..0000000
--- a/src/images/point_and_cursor_16.gif
+++ /dev/null
Binary files differ
diff --git a/src/images/point_selected_16.gif b/src/images/point_selected_16.gif
deleted file mode 100644
index 1507063..0000000
--- a/src/images/point_selected_16.gif
+++ /dev/null
Binary files differ
diff --git a/src/net/java/dev/typecast/cff/CffFont.java b/src/main/java/net/java/dev/typecast/cff/CffFont.java
index cbb197f..cbb197f 100644
--- a/src/net/java/dev/typecast/cff/CffFont.java
+++ b/src/main/java/net/java/dev/typecast/cff/CffFont.java
diff --git a/src/net/java/dev/typecast/cff/CffStandardStrings.java b/src/main/java/net/java/dev/typecast/cff/CffStandardStrings.java
index 4da6167..4da6167 100644
--- a/src/net/java/dev/typecast/cff/CffStandardStrings.java
+++ b/src/main/java/net/java/dev/typecast/cff/CffStandardStrings.java
diff --git a/src/net/java/dev/typecast/cff/Charset.java b/src/main/java/net/java/dev/typecast/cff/Charset.java
index fd16acd..fd16acd 100644
--- a/src/net/java/dev/typecast/cff/Charset.java
+++ b/src/main/java/net/java/dev/typecast/cff/Charset.java
diff --git a/src/net/java/dev/typecast/cff/CharsetFormat0.java b/src/main/java/net/java/dev/typecast/cff/CharsetFormat0.java
index a7f97f5..a7f97f5 100644
--- a/src/net/java/dev/typecast/cff/CharsetFormat0.java
+++ b/src/main/java/net/java/dev/typecast/cff/CharsetFormat0.java
diff --git a/src/net/java/dev/typecast/cff/CharsetFormat1.java b/src/main/java/net/java/dev/typecast/cff/CharsetFormat1.java
index 9b5e93a..9b5e93a 100644
--- a/src/net/java/dev/typecast/cff/CharsetFormat1.java
+++ b/src/main/java/net/java/dev/typecast/cff/CharsetFormat1.java
diff --git a/src/net/java/dev/typecast/cff/CharsetFormat2.java b/src/main/java/net/java/dev/typecast/cff/CharsetFormat2.java
index 69fadf9..69fadf9 100644
--- a/src/net/java/dev/typecast/cff/CharsetFormat2.java
+++ b/src/main/java/net/java/dev/typecast/cff/CharsetFormat2.java
diff --git a/src/net/java/dev/typecast/cff/CharsetRange.java b/src/main/java/net/java/dev/typecast/cff/CharsetRange.java
index b3d0888..b3d0888 100644
--- a/src/net/java/dev/typecast/cff/CharsetRange.java
+++ b/src/main/java/net/java/dev/typecast/cff/CharsetRange.java
diff --git a/src/net/java/dev/typecast/cff/CharsetRange1.java b/src/main/java/net/java/dev/typecast/cff/CharsetRange1.java
index dc33430..dc33430 100644
--- a/src/net/java/dev/typecast/cff/CharsetRange1.java
+++ b/src/main/java/net/java/dev/typecast/cff/CharsetRange1.java
diff --git a/src/net/java/dev/typecast/cff/CharsetRange2.java b/src/main/java/net/java/dev/typecast/cff/CharsetRange2.java
index 9e14c44..9e14c44 100644
--- a/src/net/java/dev/typecast/cff/CharsetRange2.java
+++ b/src/main/java/net/java/dev/typecast/cff/CharsetRange2.java
diff --git a/src/net/java/dev/typecast/cff/Charstring.java b/src/main/java/net/java/dev/typecast/cff/Charstring.java
index c093d3f..c093d3f 100644
--- a/src/net/java/dev/typecast/cff/Charstring.java
+++ b/src/main/java/net/java/dev/typecast/cff/Charstring.java
diff --git a/src/net/java/dev/typecast/cff/CharstringType2.java b/src/main/java/net/java/dev/typecast/cff/CharstringType2.java
index bd97a97..bd97a97 100644
--- a/src/net/java/dev/typecast/cff/CharstringType2.java
+++ b/src/main/java/net/java/dev/typecast/cff/CharstringType2.java
diff --git a/src/net/java/dev/typecast/cff/Dict.java b/src/main/java/net/java/dev/typecast/cff/Dict.java
index 5c500d8..5c500d8 100644
--- a/src/net/java/dev/typecast/cff/Dict.java
+++ b/src/main/java/net/java/dev/typecast/cff/Dict.java
diff --git a/src/net/java/dev/typecast/cff/Index.java b/src/main/java/net/java/dev/typecast/cff/Index.java
index 1e8fb81..1e8fb81 100644
--- a/src/net/java/dev/typecast/cff/Index.java
+++ b/src/main/java/net/java/dev/typecast/cff/Index.java
diff --git a/src/net/java/dev/typecast/cff/NameIndex.java b/src/main/java/net/java/dev/typecast/cff/NameIndex.java
index fa8bdab..fa8bdab 100644
--- a/src/net/java/dev/typecast/cff/NameIndex.java
+++ b/src/main/java/net/java/dev/typecast/cff/NameIndex.java
diff --git a/src/net/java/dev/typecast/cff/StringIndex.java b/src/main/java/net/java/dev/typecast/cff/StringIndex.java
index 3a25967..3a25967 100644
--- a/src/net/java/dev/typecast/cff/StringIndex.java
+++ b/src/main/java/net/java/dev/typecast/cff/StringIndex.java
diff --git a/src/net/java/dev/typecast/cff/T2Interpreter.java b/src/main/java/net/java/dev/typecast/cff/T2Interpreter.java
index 79bf51e..79bf51e 100644
--- a/src/net/java/dev/typecast/cff/T2Interpreter.java
+++ b/src/main/java/net/java/dev/typecast/cff/T2Interpreter.java
diff --git a/src/net/java/dev/typecast/cff/T2Mnemonic.java b/src/main/java/net/java/dev/typecast/cff/T2Mnemonic.java
index 55e3507..55e3507 100644
--- a/src/net/java/dev/typecast/cff/T2Mnemonic.java
+++ b/src/main/java/net/java/dev/typecast/cff/T2Mnemonic.java
diff --git a/src/net/java/dev/typecast/cff/TopDictIndex.java b/src/main/java/net/java/dev/typecast/cff/TopDictIndex.java
index d7b092e..d7b092e 100644
--- a/src/net/java/dev/typecast/cff/TopDictIndex.java
+++ b/src/main/java/net/java/dev/typecast/cff/TopDictIndex.java
diff --git a/src/net/java/dev/typecast/exchange/Exporter.java b/src/main/java/net/java/dev/typecast/exchange/Exporter.java
index b88b297..b88b297 100644
--- a/src/net/java/dev/typecast/exchange/Exporter.java
+++ b/src/main/java/net/java/dev/typecast/exchange/Exporter.java
diff --git a/src/net/java/dev/typecast/exchange/Messages.java b/src/main/java/net/java/dev/typecast/exchange/Messages.java
index 995fda5..995fda5 100644
--- a/src/net/java/dev/typecast/exchange/Messages.java
+++ b/src/main/java/net/java/dev/typecast/exchange/Messages.java
diff --git a/src/net/java/dev/typecast/exchange/Messages.properties b/src/main/java/net/java/dev/typecast/exchange/Messages.properties
index ef5e952..ef5e952 100644
--- a/src/net/java/dev/typecast/exchange/Messages.properties
+++ b/src/main/java/net/java/dev/typecast/exchange/Messages.properties
diff --git a/src/net/java/dev/typecast/exchange/SVGExporter.java b/src/main/java/net/java/dev/typecast/exchange/SVGExporter.java
index 9dcda51..9dcda51 100644
--- a/src/net/java/dev/typecast/exchange/SVGExporter.java
+++ b/src/main/java/net/java/dev/typecast/exchange/SVGExporter.java
diff --git a/src/net/java/dev/typecast/ot/Disassembler.java b/src/main/java/net/java/dev/typecast/ot/Disassembler.java
index c2ab7f2..c2ab7f2 100644
--- a/src/net/java/dev/typecast/ot/Disassembler.java
+++ b/src/main/java/net/java/dev/typecast/ot/Disassembler.java
diff --git a/src/net/java/dev/typecast/ot/Fixed.java b/src/main/java/net/java/dev/typecast/ot/Fixed.java
index 4710096..043df24 100644
--- a/src/net/java/dev/typecast/ot/Fixed.java
+++ b/src/main/java/net/java/dev/typecast/ot/Fixed.java
@@ -815,7 +815,7 @@ public class Fixed {
/**
* 26.6 fixed number square root function.
- * Simple (brain-dead) divide & conqure algorithm.
+ * Simple (brain-dead) divide & conquer algorithm.
* @param num The 26.6 fixed number in question
* @return The resulting square root
*/
diff --git a/src/net/java/dev/typecast/ot/Glyph.java b/src/main/java/net/java/dev/typecast/ot/Glyph.java
index af3fb46..af3fb46 100644
--- a/src/net/java/dev/typecast/ot/Glyph.java
+++ b/src/main/java/net/java/dev/typecast/ot/Glyph.java
diff --git a/src/net/java/dev/typecast/ot/Mnemonic.java b/src/main/java/net/java/dev/typecast/ot/Mnemonic.java
index 9a65717..9a65717 100644
--- a/src/net/java/dev/typecast/ot/Mnemonic.java
+++ b/src/main/java/net/java/dev/typecast/ot/Mnemonic.java
diff --git a/src/net/java/dev/typecast/ot/OTFont.java b/src/main/java/net/java/dev/typecast/ot/OTFont.java
index 7179aba..7179aba 100644
--- a/src/net/java/dev/typecast/ot/OTFont.java
+++ b/src/main/java/net/java/dev/typecast/ot/OTFont.java
diff --git a/src/net/java/dev/typecast/ot/OTFontCollection.java b/src/main/java/net/java/dev/typecast/ot/OTFontCollection.java
index bc13302..bc13302 100644
--- a/src/net/java/dev/typecast/ot/OTFontCollection.java
+++ b/src/main/java/net/java/dev/typecast/ot/OTFontCollection.java
diff --git a/src/net/java/dev/typecast/ot/Point.java b/src/main/java/net/java/dev/typecast/ot/Point.java
index de847ad..de847ad 100644
--- a/src/net/java/dev/typecast/ot/Point.java
+++ b/src/main/java/net/java/dev/typecast/ot/Point.java
diff --git a/src/net/java/dev/typecast/ot/T2Glyph.java b/src/main/java/net/java/dev/typecast/ot/T2Glyph.java
index 2b33f3e..2b33f3e 100644
--- a/src/net/java/dev/typecast/ot/T2Glyph.java
+++ b/src/main/java/net/java/dev/typecast/ot/T2Glyph.java
diff --git a/src/net/java/dev/typecast/ot/TTGlyph.java b/src/main/java/net/java/dev/typecast/ot/TTGlyph.java
index 24a8df6..24a8df6 100644
--- a/src/net/java/dev/typecast/ot/TTGlyph.java
+++ b/src/main/java/net/java/dev/typecast/ot/TTGlyph.java
diff --git a/src/net/java/dev/typecast/ot/mac/ResourceData.java b/src/main/java/net/java/dev/typecast/ot/mac/ResourceData.java
index 526df2d..526df2d 100644
--- a/src/net/java/dev/typecast/ot/mac/ResourceData.java
+++ b/src/main/java/net/java/dev/typecast/ot/mac/ResourceData.java
diff --git a/src/net/java/dev/typecast/ot/mac/ResourceFile.java b/src/main/java/net/java/dev/typecast/ot/mac/ResourceFile.java
index 1158f2d..1158f2d 100644
--- a/src/net/java/dev/typecast/ot/mac/ResourceFile.java
+++ b/src/main/java/net/java/dev/typecast/ot/mac/ResourceFile.java
diff --git a/src/net/java/dev/typecast/ot/mac/ResourceHeader.java b/src/main/java/net/java/dev/typecast/ot/mac/ResourceHeader.java
index ba4b82b..ba4b82b 100644
--- a/src/net/java/dev/typecast/ot/mac/ResourceHeader.java
+++ b/src/main/java/net/java/dev/typecast/ot/mac/ResourceHeader.java
diff --git a/src/net/java/dev/typecast/ot/mac/ResourceMap.java b/src/main/java/net/java/dev/typecast/ot/mac/ResourceMap.java
index 37579f8..37579f8 100644
--- a/src/net/java/dev/typecast/ot/mac/ResourceMap.java
+++ b/src/main/java/net/java/dev/typecast/ot/mac/ResourceMap.java
diff --git a/src/net/java/dev/typecast/ot/mac/ResourceReference.java b/src/main/java/net/java/dev/typecast/ot/mac/ResourceReference.java
index 39667fa..39667fa 100644
--- a/src/net/java/dev/typecast/ot/mac/ResourceReference.java
+++ b/src/main/java/net/java/dev/typecast/ot/mac/ResourceReference.java
diff --git a/src/net/java/dev/typecast/ot/mac/ResourceType.java b/src/main/java/net/java/dev/typecast/ot/mac/ResourceType.java
index f43ad2f..f43ad2f 100644
--- a/src/net/java/dev/typecast/ot/mac/ResourceType.java
+++ b/src/main/java/net/java/dev/typecast/ot/mac/ResourceType.java
diff --git a/src/net/java/dev/typecast/ot/table/BaseTable.java b/src/main/java/net/java/dev/typecast/ot/table/BaseTable.java
index 3531322..3531322 100644
--- a/src/net/java/dev/typecast/ot/table/BaseTable.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/BaseTable.java
diff --git a/src/net/java/dev/typecast/ot/table/CffTable.java b/src/main/java/net/java/dev/typecast/ot/table/CffTable.java
index a0d8436..a0d8436 100644
--- a/src/net/java/dev/typecast/ot/table/CffTable.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/CffTable.java
diff --git a/src/net/java/dev/typecast/ot/table/ClassDef.java b/src/main/java/net/java/dev/typecast/ot/table/ClassDef.java
index 61335e9..61335e9 100644
--- a/src/net/java/dev/typecast/ot/table/ClassDef.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/ClassDef.java
diff --git a/src/net/java/dev/typecast/ot/table/ClassDefFormat1.java b/src/main/java/net/java/dev/typecast/ot/table/ClassDefFormat1.java
index b578f01..b578f01 100644
--- a/src/net/java/dev/typecast/ot/table/ClassDefFormat1.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/ClassDefFormat1.java
diff --git a/src/net/java/dev/typecast/ot/table/ClassDefFormat2.java b/src/main/java/net/java/dev/typecast/ot/table/ClassDefFormat2.java
index 8aff14a..8aff14a 100644
--- a/src/net/java/dev/typecast/ot/table/ClassDefFormat2.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/ClassDefFormat2.java
diff --git a/src/net/java/dev/typecast/ot/table/CmapFormat.java b/src/main/java/net/java/dev/typecast/ot/table/CmapFormat.java
index 5a2cef6..5a2cef6 100644
--- a/src/net/java/dev/typecast/ot/table/CmapFormat.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/CmapFormat.java
diff --git a/src/net/java/dev/typecast/ot/table/CmapFormat0.java b/src/main/java/net/java/dev/typecast/ot/table/CmapFormat0.java
index 329a650..329a650 100644
--- a/src/net/java/dev/typecast/ot/table/CmapFormat0.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/CmapFormat0.java
diff --git a/src/net/java/dev/typecast/ot/table/CmapFormat12.java b/src/main/java/net/java/dev/typecast/ot/table/CmapFormat12.java
index daf6306..daf6306 100644
--- a/src/net/java/dev/typecast/ot/table/CmapFormat12.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/CmapFormat12.java
diff --git a/src/net/java/dev/typecast/ot/table/CmapFormat2.java b/src/main/java/net/java/dev/typecast/ot/table/CmapFormat2.java
index cff572e..cff572e 100644
--- a/src/net/java/dev/typecast/ot/table/CmapFormat2.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/CmapFormat2.java
diff --git a/src/net/java/dev/typecast/ot/table/CmapFormat4.java b/src/main/java/net/java/dev/typecast/ot/table/CmapFormat4.java
index 034e6f3..034e6f3 100644
--- a/src/net/java/dev/typecast/ot/table/CmapFormat4.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/CmapFormat4.java
diff --git a/src/net/java/dev/typecast/ot/table/CmapFormat6.java b/src/main/java/net/java/dev/typecast/ot/table/CmapFormat6.java
index af93e0a..af93e0a 100644
--- a/src/net/java/dev/typecast/ot/table/CmapFormat6.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/CmapFormat6.java
diff --git a/src/net/java/dev/typecast/ot/table/CmapFormatUnknown.java b/src/main/java/net/java/dev/typecast/ot/table/CmapFormatUnknown.java
index fe1fef3..fe1fef3 100644
--- a/src/net/java/dev/typecast/ot/table/CmapFormatUnknown.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/CmapFormatUnknown.java
diff --git a/src/net/java/dev/typecast/ot/table/CmapIndexEntry.java b/src/main/java/net/java/dev/typecast/ot/table/CmapIndexEntry.java
index 7982568..7982568 100644
--- a/src/net/java/dev/typecast/ot/table/CmapIndexEntry.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/CmapIndexEntry.java
diff --git a/src/net/java/dev/typecast/ot/table/CmapTable.java b/src/main/java/net/java/dev/typecast/ot/table/CmapTable.java
index 868222e..868222e 100644
--- a/src/net/java/dev/typecast/ot/table/CmapTable.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/CmapTable.java
diff --git a/src/net/java/dev/typecast/ot/table/ColrTable.java b/src/main/java/net/java/dev/typecast/ot/table/ColrTable.java
index 45051d3..45051d3 100644
--- a/src/net/java/dev/typecast/ot/table/ColrTable.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/ColrTable.java
diff --git a/src/net/java/dev/typecast/ot/table/Coverage.java b/src/main/java/net/java/dev/typecast/ot/table/Coverage.java
index 684139f..684139f 100644
--- a/src/net/java/dev/typecast/ot/table/Coverage.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/Coverage.java
diff --git a/src/net/java/dev/typecast/ot/table/CoverageFormat1.java b/src/main/java/net/java/dev/typecast/ot/table/CoverageFormat1.java
index 238ce9e..238ce9e 100644
--- a/src/net/java/dev/typecast/ot/table/CoverageFormat1.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/CoverageFormat1.java
diff --git a/src/net/java/dev/typecast/ot/table/CoverageFormat2.java b/src/main/java/net/java/dev/typecast/ot/table/CoverageFormat2.java
index 234ec74..234ec74 100644
--- a/src/net/java/dev/typecast/ot/table/CoverageFormat2.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/CoverageFormat2.java
diff --git a/src/net/java/dev/typecast/ot/table/CpalTable.java b/src/main/java/net/java/dev/typecast/ot/table/CpalTable.java
index 9a3d384..9a3d384 100644
--- a/src/net/java/dev/typecast/ot/table/CpalTable.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/CpalTable.java
diff --git a/src/net/java/dev/typecast/ot/table/CvtTable.java b/src/main/java/net/java/dev/typecast/ot/table/CvtTable.java
index b912704..b912704 100644
--- a/src/net/java/dev/typecast/ot/table/CvtTable.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/CvtTable.java
diff --git a/src/net/java/dev/typecast/ot/table/Device.java b/src/main/java/net/java/dev/typecast/ot/table/Device.java
index dd44eae..dd44eae 100644
--- a/src/net/java/dev/typecast/ot/table/Device.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/Device.java
diff --git a/src/net/java/dev/typecast/ot/table/DirectoryEntry.java b/src/main/java/net/java/dev/typecast/ot/table/DirectoryEntry.java
index 2ab838b..2ab838b 100644
--- a/src/net/java/dev/typecast/ot/table/DirectoryEntry.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/DirectoryEntry.java
diff --git a/src/net/java/dev/typecast/ot/table/DsigEntry.java b/src/main/java/net/java/dev/typecast/ot/table/DsigEntry.java
index 35246e5..35246e5 100644
--- a/src/net/java/dev/typecast/ot/table/DsigEntry.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/DsigEntry.java
diff --git a/src/net/java/dev/typecast/ot/table/DsigTable.java b/src/main/java/net/java/dev/typecast/ot/table/DsigTable.java
index 56a8609..56a8609 100644
--- a/src/net/java/dev/typecast/ot/table/DsigTable.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/DsigTable.java
diff --git a/src/net/java/dev/typecast/ot/table/Feature.java b/src/main/java/net/java/dev/typecast/ot/table/Feature.java
index d454455..d454455 100644
--- a/src/net/java/dev/typecast/ot/table/Feature.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/Feature.java
diff --git a/src/net/java/dev/typecast/ot/table/FeatureList.java b/src/main/java/net/java/dev/typecast/ot/table/FeatureList.java
index c98bb40..c98bb40 100644
--- a/src/net/java/dev/typecast/ot/table/FeatureList.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/FeatureList.java
diff --git a/src/net/java/dev/typecast/ot/table/FeatureRecord.java b/src/main/java/net/java/dev/typecast/ot/table/FeatureRecord.java
index ba7eb26..ba7eb26 100644
--- a/src/net/java/dev/typecast/ot/table/FeatureRecord.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/FeatureRecord.java
diff --git a/src/net/java/dev/typecast/ot/table/FeatureTags.java b/src/main/java/net/java/dev/typecast/ot/table/FeatureTags.java
index 2062645..2062645 100644
--- a/src/net/java/dev/typecast/ot/table/FeatureTags.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/FeatureTags.java
diff --git a/src/net/java/dev/typecast/ot/table/FpgmTable.java b/src/main/java/net/java/dev/typecast/ot/table/FpgmTable.java
index 4c3ca59..4c3ca59 100644
--- a/src/net/java/dev/typecast/ot/table/FpgmTable.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/FpgmTable.java
diff --git a/src/net/java/dev/typecast/ot/table/GaspRange.java b/src/main/java/net/java/dev/typecast/ot/table/GaspRange.java
index d85b337..d85b337 100644
--- a/src/net/java/dev/typecast/ot/table/GaspRange.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/GaspRange.java
diff --git a/src/net/java/dev/typecast/ot/table/GaspTable.java b/src/main/java/net/java/dev/typecast/ot/table/GaspTable.java
index 6c68263..6c68263 100644
--- a/src/net/java/dev/typecast/ot/table/GaspTable.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/GaspTable.java
diff --git a/src/net/java/dev/typecast/ot/table/GdefTable.java b/src/main/java/net/java/dev/typecast/ot/table/GdefTable.java
index 2358aa9..2358aa9 100644
--- a/src/net/java/dev/typecast/ot/table/GdefTable.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/GdefTable.java
diff --git a/src/net/java/dev/typecast/ot/table/GlyfCompositeComp.java b/src/main/java/net/java/dev/typecast/ot/table/GlyfCompositeComp.java
index b6cc120..b6cc120 100644
--- a/src/net/java/dev/typecast/ot/table/GlyfCompositeComp.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/GlyfCompositeComp.java
diff --git a/src/net/java/dev/typecast/ot/table/GlyfCompositeDescript.java b/src/main/java/net/java/dev/typecast/ot/table/GlyfCompositeDescript.java
index d5a73db..d5a73db 100644
--- a/src/net/java/dev/typecast/ot/table/GlyfCompositeDescript.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/GlyfCompositeDescript.java
diff --git a/src/net/java/dev/typecast/ot/table/GlyfDescript.java b/src/main/java/net/java/dev/typecast/ot/table/GlyfDescript.java
index 1d2669e..1d2669e 100644
--- a/src/net/java/dev/typecast/ot/table/GlyfDescript.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/GlyfDescript.java
diff --git a/src/net/java/dev/typecast/ot/table/GlyfSimpleDescript.java b/src/main/java/net/java/dev/typecast/ot/table/GlyfSimpleDescript.java
index 0e82135..0e82135 100644
--- a/src/net/java/dev/typecast/ot/table/GlyfSimpleDescript.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/GlyfSimpleDescript.java
diff --git a/src/net/java/dev/typecast/ot/table/GlyfTable.java b/src/main/java/net/java/dev/typecast/ot/table/GlyfTable.java
index f046c17..f046c17 100644
--- a/src/net/java/dev/typecast/ot/table/GlyfTable.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/GlyfTable.java
diff --git a/src/net/java/dev/typecast/ot/table/GlyphDescription.java b/src/main/java/net/java/dev/typecast/ot/table/GlyphDescription.java
index 3939192..3939192 100644
--- a/src/net/java/dev/typecast/ot/table/GlyphDescription.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/GlyphDescription.java
diff --git a/src/net/java/dev/typecast/ot/table/GposTable.java b/src/main/java/net/java/dev/typecast/ot/table/GposTable.java
index 7bec107..7bec107 100644
--- a/src/net/java/dev/typecast/ot/table/GposTable.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/GposTable.java
diff --git a/src/net/java/dev/typecast/ot/table/GsubTable.java b/src/main/java/net/java/dev/typecast/ot/table/GsubTable.java
index 81b4bbc..81b4bbc 100644
--- a/src/net/java/dev/typecast/ot/table/GsubTable.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/GsubTable.java
diff --git a/src/net/java/dev/typecast/ot/table/HdmxTable.java b/src/main/java/net/java/dev/typecast/ot/table/HdmxTable.java
index 1df5255..1df5255 100644
--- a/src/net/java/dev/typecast/ot/table/HdmxTable.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/HdmxTable.java
diff --git a/src/net/java/dev/typecast/ot/table/HeadTable.java b/src/main/java/net/java/dev/typecast/ot/table/HeadTable.java
index 2db1c4a..2db1c4a 100644
--- a/src/net/java/dev/typecast/ot/table/HeadTable.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/HeadTable.java
diff --git a/src/net/java/dev/typecast/ot/table/HheaTable.java b/src/main/java/net/java/dev/typecast/ot/table/HheaTable.java
index 7641cc1..7641cc1 100644
--- a/src/net/java/dev/typecast/ot/table/HheaTable.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/HheaTable.java
diff --git a/src/net/java/dev/typecast/ot/table/HmtxTable.java b/src/main/java/net/java/dev/typecast/ot/table/HmtxTable.java
index 42fdd09..42fdd09 100644
--- a/src/net/java/dev/typecast/ot/table/HmtxTable.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/HmtxTable.java
diff --git a/src/net/java/dev/typecast/ot/table/ID.java b/src/main/java/net/java/dev/typecast/ot/table/ID.java
index 1fdac60..1fdac60 100644
--- a/src/net/java/dev/typecast/ot/table/ID.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/ID.java
diff --git a/src/net/java/dev/typecast/ot/table/KernSubtable.java b/src/main/java/net/java/dev/typecast/ot/table/KernSubtable.java
index 9b31dbc..9b31dbc 100644
--- a/src/net/java/dev/typecast/ot/table/KernSubtable.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/KernSubtable.java
diff --git a/src/net/java/dev/typecast/ot/table/KernSubtableFormat0.java b/src/main/java/net/java/dev/typecast/ot/table/KernSubtableFormat0.java
index 9cad4a5..9cad4a5 100644
--- a/src/net/java/dev/typecast/ot/table/KernSubtableFormat0.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/KernSubtableFormat0.java
diff --git a/src/net/java/dev/typecast/ot/table/KernSubtableFormat2.java b/src/main/java/net/java/dev/typecast/ot/table/KernSubtableFormat2.java
index 95dbea1..95dbea1 100644
--- a/src/net/java/dev/typecast/ot/table/KernSubtableFormat2.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/KernSubtableFormat2.java
diff --git a/src/net/java/dev/typecast/ot/table/KernTable.java b/src/main/java/net/java/dev/typecast/ot/table/KernTable.java
index a5210ee..a5210ee 100644
--- a/src/net/java/dev/typecast/ot/table/KernTable.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/KernTable.java
diff --git a/src/net/java/dev/typecast/ot/table/KerningPair.java b/src/main/java/net/java/dev/typecast/ot/table/KerningPair.java
index 366343a..366343a 100644
--- a/src/net/java/dev/typecast/ot/table/KerningPair.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/KerningPair.java
diff --git a/src/net/java/dev/typecast/ot/table/LangSys.java b/src/main/java/net/java/dev/typecast/ot/table/LangSys.java
index 2cb1ef6..2cb1ef6 100644
--- a/src/net/java/dev/typecast/ot/table/LangSys.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/LangSys.java
diff --git a/src/net/java/dev/typecast/ot/table/LangSysRecord.java b/src/main/java/net/java/dev/typecast/ot/table/LangSysRecord.java
index a105c3d..a105c3d 100644
--- a/src/net/java/dev/typecast/ot/table/LangSysRecord.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/LangSysRecord.java
diff --git a/src/net/java/dev/typecast/ot/table/Ligature.java b/src/main/java/net/java/dev/typecast/ot/table/Ligature.java
index 2dd3783..2dd3783 100644
--- a/src/net/java/dev/typecast/ot/table/Ligature.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/Ligature.java
diff --git a/src/net/java/dev/typecast/ot/table/LigatureSet.java b/src/main/java/net/java/dev/typecast/ot/table/LigatureSet.java
index 4eab7bd..4eab7bd 100644
--- a/src/net/java/dev/typecast/ot/table/LigatureSet.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/LigatureSet.java
diff --git a/src/net/java/dev/typecast/ot/table/LigatureSubst.java b/src/main/java/net/java/dev/typecast/ot/table/LigatureSubst.java
index 59c8b24..59c8b24 100644
--- a/src/net/java/dev/typecast/ot/table/LigatureSubst.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/LigatureSubst.java
diff --git a/src/net/java/dev/typecast/ot/table/LigatureSubstFormat1.java b/src/main/java/net/java/dev/typecast/ot/table/LigatureSubstFormat1.java
index 4ba4f66..4ba4f66 100644
--- a/src/net/java/dev/typecast/ot/table/LigatureSubstFormat1.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/LigatureSubstFormat1.java
diff --git a/src/net/java/dev/typecast/ot/table/LocaTable.java b/src/main/java/net/java/dev/typecast/ot/table/LocaTable.java
index 34ba93f..34ba93f 100644
--- a/src/net/java/dev/typecast/ot/table/LocaTable.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/LocaTable.java
diff --git a/src/net/java/dev/typecast/ot/table/Lookup.java b/src/main/java/net/java/dev/typecast/ot/table/Lookup.java
index f39f5de..f39f5de 100644
--- a/src/net/java/dev/typecast/ot/table/Lookup.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/Lookup.java
diff --git a/src/net/java/dev/typecast/ot/table/LookupList.java b/src/main/java/net/java/dev/typecast/ot/table/LookupList.java
index c06ff31..c06ff31 100644
--- a/src/net/java/dev/typecast/ot/table/LookupList.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/LookupList.java
diff --git a/src/net/java/dev/typecast/ot/table/LookupSubtable.java b/src/main/java/net/java/dev/typecast/ot/table/LookupSubtable.java
index 28a3fbf..28a3fbf 100644
--- a/src/net/java/dev/typecast/ot/table/LookupSubtable.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/LookupSubtable.java
diff --git a/src/net/java/dev/typecast/ot/table/LookupSubtableFactory.java b/src/main/java/net/java/dev/typecast/ot/table/LookupSubtableFactory.java
index fcaa642..fcaa642 100644
--- a/src/net/java/dev/typecast/ot/table/LookupSubtableFactory.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/LookupSubtableFactory.java
diff --git a/src/net/java/dev/typecast/ot/table/LtshTable.java b/src/main/java/net/java/dev/typecast/ot/table/LtshTable.java
index 48fd263..48fd263 100644
--- a/src/net/java/dev/typecast/ot/table/LtshTable.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/LtshTable.java
diff --git a/src/net/java/dev/typecast/ot/table/MaxpTable.java b/src/main/java/net/java/dev/typecast/ot/table/MaxpTable.java
index c01a7f8..c01a7f8 100644
--- a/src/net/java/dev/typecast/ot/table/MaxpTable.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/MaxpTable.java
diff --git a/src/net/java/dev/typecast/ot/table/NameRecord.java b/src/main/java/net/java/dev/typecast/ot/table/NameRecord.java
index 65fb8f8..65fb8f8 100644
--- a/src/net/java/dev/typecast/ot/table/NameRecord.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/NameRecord.java
diff --git a/src/net/java/dev/typecast/ot/table/NameTable.java b/src/main/java/net/java/dev/typecast/ot/table/NameTable.java
index 5e80e5e..5e80e5e 100644
--- a/src/net/java/dev/typecast/ot/table/NameTable.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/NameTable.java
diff --git a/src/net/java/dev/typecast/ot/table/Os2Table.java b/src/main/java/net/java/dev/typecast/ot/table/Os2Table.java
index 09c9adf..09c9adf 100644
--- a/src/net/java/dev/typecast/ot/table/Os2Table.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/Os2Table.java
diff --git a/src/net/java/dev/typecast/ot/table/Panose.java b/src/main/java/net/java/dev/typecast/ot/table/Panose.java
index a6064e8..a6064e8 100644
--- a/src/net/java/dev/typecast/ot/table/Panose.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/Panose.java
diff --git a/src/net/java/dev/typecast/ot/table/PcltTable.java b/src/main/java/net/java/dev/typecast/ot/table/PcltTable.java
index dbfd69f..dbfd69f 100644
--- a/src/net/java/dev/typecast/ot/table/PcltTable.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/PcltTable.java
diff --git a/src/net/java/dev/typecast/ot/table/PostTable.java b/src/main/java/net/java/dev/typecast/ot/table/PostTable.java
index c1d1fbe..c1d1fbe 100644
--- a/src/net/java/dev/typecast/ot/table/PostTable.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/PostTable.java
diff --git a/src/net/java/dev/typecast/ot/table/PrepTable.java b/src/main/java/net/java/dev/typecast/ot/table/PrepTable.java
index d069616..d069616 100644
--- a/src/net/java/dev/typecast/ot/table/PrepTable.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/PrepTable.java
diff --git a/src/net/java/dev/typecast/ot/table/Program.java b/src/main/java/net/java/dev/typecast/ot/table/Program.java
index 82549e1..82549e1 100644
--- a/src/net/java/dev/typecast/ot/table/Program.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/Program.java
diff --git a/src/net/java/dev/typecast/ot/table/RangeRecord.java b/src/main/java/net/java/dev/typecast/ot/table/RangeRecord.java
index 5073b9c..5073b9c 100644
--- a/src/net/java/dev/typecast/ot/table/RangeRecord.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/RangeRecord.java
diff --git a/src/net/java/dev/typecast/ot/table/SbixTable.java b/src/main/java/net/java/dev/typecast/ot/table/SbixTable.java
index 3d9f5f8..3d9f5f8 100644
--- a/src/net/java/dev/typecast/ot/table/SbixTable.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/SbixTable.java
diff --git a/src/net/java/dev/typecast/ot/table/Script.java b/src/main/java/net/java/dev/typecast/ot/table/Script.java
index c8ed06c..c8ed06c 100644
--- a/src/net/java/dev/typecast/ot/table/Script.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/Script.java
diff --git a/src/net/java/dev/typecast/ot/table/ScriptList.java b/src/main/java/net/java/dev/typecast/ot/table/ScriptList.java
index 4b3edd0..4b3edd0 100644
--- a/src/net/java/dev/typecast/ot/table/ScriptList.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/ScriptList.java
diff --git a/src/net/java/dev/typecast/ot/table/ScriptRecord.java b/src/main/java/net/java/dev/typecast/ot/table/ScriptRecord.java
index 6d7c212..6d7c212 100644
--- a/src/net/java/dev/typecast/ot/table/ScriptRecord.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/ScriptRecord.java
diff --git a/src/net/java/dev/typecast/ot/table/ScriptTags.java b/src/main/java/net/java/dev/typecast/ot/table/ScriptTags.java
index eaaa6c2..eaaa6c2 100644
--- a/src/net/java/dev/typecast/ot/table/ScriptTags.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/ScriptTags.java
diff --git a/src/net/java/dev/typecast/ot/table/SignatureBlock.java b/src/main/java/net/java/dev/typecast/ot/table/SignatureBlock.java
index 621a956..621a956 100644
--- a/src/net/java/dev/typecast/ot/table/SignatureBlock.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/SignatureBlock.java
diff --git a/src/net/java/dev/typecast/ot/table/SingleSubst.java b/src/main/java/net/java/dev/typecast/ot/table/SingleSubst.java
index dbfc6a7..dbfc6a7 100644
--- a/src/net/java/dev/typecast/ot/table/SingleSubst.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/SingleSubst.java
diff --git a/src/net/java/dev/typecast/ot/table/SingleSubstFormat1.java b/src/main/java/net/java/dev/typecast/ot/table/SingleSubstFormat1.java
index 73af2d8..73af2d8 100644
--- a/src/net/java/dev/typecast/ot/table/SingleSubstFormat1.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/SingleSubstFormat1.java
diff --git a/src/net/java/dev/typecast/ot/table/SingleSubstFormat2.java b/src/main/java/net/java/dev/typecast/ot/table/SingleSubstFormat2.java
index 6608589..6608589 100644
--- a/src/net/java/dev/typecast/ot/table/SingleSubstFormat2.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/SingleSubstFormat2.java
diff --git a/src/net/java/dev/typecast/ot/table/TTCHeader.java b/src/main/java/net/java/dev/typecast/ot/table/TTCHeader.java
index 652968e..652968e 100644
--- a/src/net/java/dev/typecast/ot/table/TTCHeader.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/TTCHeader.java
diff --git a/src/net/java/dev/typecast/ot/table/Table.java b/src/main/java/net/java/dev/typecast/ot/table/Table.java
index 7d6319d..7d6319d 100644
--- a/src/net/java/dev/typecast/ot/table/Table.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/Table.java
diff --git a/src/net/java/dev/typecast/ot/table/TableDirectory.java b/src/main/java/net/java/dev/typecast/ot/table/TableDirectory.java
index d3ee90c..d3ee90c 100644
--- a/src/net/java/dev/typecast/ot/table/TableDirectory.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/TableDirectory.java
diff --git a/src/net/java/dev/typecast/ot/table/TableException.java b/src/main/java/net/java/dev/typecast/ot/table/TableException.java
index d65ff0f..d65ff0f 100644
--- a/src/net/java/dev/typecast/ot/table/TableException.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/TableException.java
diff --git a/src/net/java/dev/typecast/ot/table/TableFactory.java b/src/main/java/net/java/dev/typecast/ot/table/TableFactory.java
index 2034ce7..2034ce7 100644
--- a/src/net/java/dev/typecast/ot/table/TableFactory.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/TableFactory.java
diff --git a/src/net/java/dev/typecast/ot/table/VdmxTable.java b/src/main/java/net/java/dev/typecast/ot/table/VdmxTable.java
index fbf721c..fbf721c 100644
--- a/src/net/java/dev/typecast/ot/table/VdmxTable.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/VdmxTable.java
diff --git a/src/net/java/dev/typecast/ot/table/VheaTable.java b/src/main/java/net/java/dev/typecast/ot/table/VheaTable.java
index d761075..d761075 100644
--- a/src/net/java/dev/typecast/ot/table/VheaTable.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/VheaTable.java
diff --git a/src/net/java/dev/typecast/ot/table/VmtxTable.java b/src/main/java/net/java/dev/typecast/ot/table/VmtxTable.java
index 7fd2f8a..7fd2f8a 100644
--- a/src/net/java/dev/typecast/ot/table/VmtxTable.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/VmtxTable.java
diff --git a/src/net/java/dev/typecast/render/GlyphImageFactory.java b/src/main/java/net/java/dev/typecast/render/GlyphImageFactory.java
index 580305b..580305b 100644
--- a/src/net/java/dev/typecast/render/GlyphImageFactory.java
+++ b/src/main/java/net/java/dev/typecast/render/GlyphImageFactory.java
diff --git a/src/net/java/dev/typecast/render/GlyphPathFactory.java b/src/main/java/net/java/dev/typecast/render/GlyphPathFactory.java
index 257ba7e..257ba7e 100644
--- a/src/net/java/dev/typecast/render/GlyphPathFactory.java
+++ b/src/main/java/net/java/dev/typecast/render/GlyphPathFactory.java
diff --git a/src/net/java/dev/typecast/tt/engine/GraphicsState.java b/src/main/java/net/java/dev/typecast/tt/engine/GraphicsState.java
index 0a414f9..0a414f9 100644
--- a/src/net/java/dev/typecast/tt/engine/GraphicsState.java
+++ b/src/main/java/net/java/dev/typecast/tt/engine/GraphicsState.java
diff --git a/src/net/java/dev/typecast/tt/engine/Interpreter.java b/src/main/java/net/java/dev/typecast/tt/engine/Interpreter.java
index 7397db4..7397db4 100644
--- a/src/net/java/dev/typecast/tt/engine/Interpreter.java
+++ b/src/main/java/net/java/dev/typecast/tt/engine/Interpreter.java
diff --git a/src/net/java/dev/typecast/tt/engine/Parser.java b/src/main/java/net/java/dev/typecast/tt/engine/Parser.java
index 9e10b33..9e10b33 100644
--- a/src/net/java/dev/typecast/tt/engine/Parser.java
+++ b/src/main/java/net/java/dev/typecast/tt/engine/Parser.java
diff --git a/src/org/apache/batik/i18n/ExtendedLocalizable.java b/src/main/java/org/apache/batik/i18n/ExtendedLocalizable.java
index 30c118f..30c118f 100644
--- a/src/org/apache/batik/i18n/ExtendedLocalizable.java
+++ b/src/main/java/org/apache/batik/i18n/ExtendedLocalizable.java
diff --git a/src/org/apache/batik/i18n/LocaleGroup.java b/src/main/java/org/apache/batik/i18n/LocaleGroup.java
index 94d3f8e..94d3f8e 100644
--- a/src/org/apache/batik/i18n/LocaleGroup.java
+++ b/src/main/java/org/apache/batik/i18n/LocaleGroup.java
diff --git a/src/org/apache/batik/i18n/Localizable.java b/src/main/java/org/apache/batik/i18n/Localizable.java
index 4dd0321..4dd0321 100644
--- a/src/org/apache/batik/i18n/Localizable.java
+++ b/src/main/java/org/apache/batik/i18n/Localizable.java
diff --git a/src/org/apache/batik/i18n/LocalizableSupport.java b/src/main/java/org/apache/batik/i18n/LocalizableSupport.java
index f275f27..f275f27 100644
--- a/src/org/apache/batik/i18n/LocalizableSupport.java
+++ b/src/main/java/org/apache/batik/i18n/LocalizableSupport.java
diff --git a/src/org/apache/batik/util/CSSConstants.java b/src/main/java/org/apache/batik/util/CSSConstants.java
index 334d427..334d427 100644
--- a/src/org/apache/batik/util/CSSConstants.java
+++ b/src/main/java/org/apache/batik/util/CSSConstants.java
diff --git a/src/org/apache/batik/util/SVGConstants.java b/src/main/java/org/apache/batik/util/SVGConstants.java
index 8cf9e74..8cf9e74 100644
--- a/src/org/apache/batik/util/SVGConstants.java
+++ b/src/main/java/org/apache/batik/util/SVGConstants.java
diff --git a/src/org/apache/batik/util/XMLConstants.java b/src/main/java/org/apache/batik/util/XMLConstants.java
index b6d1229..b6d1229 100644
--- a/src/org/apache/batik/util/XMLConstants.java
+++ b/src/main/java/org/apache/batik/util/XMLConstants.java
diff --git a/resources/logback.xml b/src/main/resources/logback.xml
index e29aa69..e29aa69 100644
--- a/resources/logback.xml
+++ b/src/main/resources/logback.xml
diff --git a/src/net/java/dev/typecast/app/editor/BitmapPanel.java b/src/net/java/dev/typecast/app/editor/BitmapPanel.java
deleted file mode 100644
index bd2a927..0000000
--- a/src/net/java/dev/typecast/app/editor/BitmapPanel.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Typecast - The Font Development Environment
- *
- * Copyright (c) 2004-2016 David Schweinsberg
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package net.java.dev.typecast.app.editor;
-
-import java.awt.Graphics;
-import java.awt.image.BufferedImage;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import javax.imageio.ImageIO;
-import javax.swing.JPanel;
-import net.java.dev.typecast.app.framework.EditorView;
-import net.java.dev.typecast.ot.OTFont;
-import net.java.dev.typecast.ot.table.SbixTable;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A basic bitmap view.
- * @author <a href="mailto:[email protected]">David Schweinsberg</a>
- */
-public final class BitmapPanel extends JPanel implements EditorView {
-
- private BufferedImage _image;
-
- private static final long serialVersionUID = 1L;
-
- static final Logger logger = LoggerFactory.getLogger(BitmapPanel.class);
-
- public BitmapPanel() {
- }
-
- @Override
- protected void paintComponent(Graphics g) {
- super.paintComponent(g);
- g.drawImage(_image, 0, 0, this);
- }
-
- @Override
- public void setModel(OTFont font, Object obj) {
- SbixTable.GlyphDataRecord gdr = (SbixTable.GlyphDataRecord) obj;
- ByteArrayInputStream input = new ByteArrayInputStream(gdr.getData());
- try {
- _image = ImageIO.read(input);
- } catch (IOException e) {
- logger.error("Unable to load image data: " + e.toString());
- }
- }
-}
diff --git a/src/net/java/dev/typecast/app/editor/DumpPanel.java b/src/net/java/dev/typecast/app/editor/DumpPanel.java
deleted file mode 100644
index b9ac77e..0000000
--- a/src/net/java/dev/typecast/app/editor/DumpPanel.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Typecast - The Font Development Environment
- *
- * Copyright (c) 2004-2016 David Schweinsberg
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.java.dev.typecast.app.editor;
-
-import java.awt.BorderLayout;
-import java.awt.Font;
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-import javax.swing.JTextArea;
-import net.java.dev.typecast.app.framework.EditorView;
-import net.java.dev.typecast.ot.OTFont;
-
-/**
- * A simple view of an object's "toString()" output.
- * @author <a href="mailto:[email protected]">David Schweinsberg</a>
- */
-public class DumpPanel extends JPanel implements EditorView {
-
- private static final long serialVersionUID = 1L;
-
- private final JTextArea _dumpTextArea;
-
- /** Creates a new instance of DumpPanel */
- public DumpPanel() {
- setLayout(new BorderLayout());
- _dumpTextArea = new JTextArea();
- _dumpTextArea.setEditable(false);
- _dumpTextArea.setFont(new Font("Monospaced", Font.PLAIN, 12));
- add(new JScrollPane(
- _dumpTextArea,
- JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
- JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS),
- BorderLayout.CENTER);
- }
-
- @Override
- public void setModel(OTFont font, Object obj) {
- _dumpTextArea.setText(obj.toString());
- }
-}
diff --git a/src/net/java/dev/typecast/app/editor/EditorFileFilter.java b/src/net/java/dev/typecast/app/editor/EditorFileFilter.java
deleted file mode 100644
index 15d6a48..0000000
--- a/src/net/java/dev/typecast/app/editor/EditorFileFilter.java
+++ /dev/null
@@ -1,264 +0,0 @@
-/*
- * @(#)ExampleFileFilter.java 1.9 99/04/23
- *
- * Copyright (c) 1998, 1999 by Sun Microsystems, Inc. All Rights Reserved.
- *
- * Sun grants you ("Licensee") a non-exclusive, royalty free, license to use,
- * modify and redistribute this software in source and binary code form,
- * provided that i) this copyright notice and license appear on all copies of
- * the software; and ii) Licensee does not utilize the software in a manner
- * which is disparaging to Sun.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY
- * IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
- * NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE
- * LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
- * OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS
- * LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT,
- * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
- * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF
- * OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGES.
- *
- * This software is not designed or intended for use in on-line control of
- * aircraft, air traffic, aircraft navigation or aircraft communications; or in
- * the design, construction, operation or maintenance of any nuclear
- * facility. Licensee represents and warrants that it will not use or
- * redistribute the Software for such purposes.
- */
-package net.java.dev.typecast.app.editor;
-
-import java.io.File;
-import java.util.Hashtable;
-import java.util.Enumeration;
-import javax.swing.*;
-import javax.swing.filechooser.*;
-
-/**
- * A convenience implementation of FileFilter that filters out
- * all files except for those type extensions that it knows about.
- *
- * Extensions are of the type ".foo", which is typically found on
- * Windows and Unix boxes, but not on Macinthosh. Case is ignored.
- *
- * Example - create a new filter that filerts out all files
- * but gif and jpg image files:
- *
- * JFileChooser chooser = new JFileChooser();
- * ExampleFileFilter filter = new ExampleFileFilter(
- * new String{"gif", "jpg"}, "JPEG & GIF Images")
- * chooser.addChoosableFileFilter(filter);
- * chooser.showOpenDialog(this);
- *
- * @version 1.9 04/23/99
- * @author Jeff Dinkins
- */
-public class EditorFileFilter extends FileFilter {
-
- private static String TYPE_UNKNOWN = "Type Unknown";
- private static String HIDDEN_FILE = "Hidden File";
-
- private Hashtable<String, FileFilter> filters = null;
- private String description = null;
- private String fullDescription = null;
- private boolean useExtensionsInDescription = true;
-
- /**
- * Creates a file filter. If no filters are added, then all
- * files are accepted.
- *
- * @see #addExtension
- */
- public EditorFileFilter() {
- this.filters = new Hashtable<String, FileFilter>();
- }
-
- /**
- * Creates a file filter that accepts files with the given extension.
- * Example: new ExampleFileFilter("jpg");
- *
- * @see #addExtension
- */
- public EditorFileFilter(String extension) {
- this(extension,null);
- }
-
- /**
- * Creates a file filter that accepts the given file type.
- * Example: new ExampleFileFilter("jpg", "JPEG Image Images");
- *
- * Note that the "." before the extension is not needed. If
- * provided, it will be ignored.
- *
- * @see #addExtension
- */
- public EditorFileFilter(String extension, String description) {
- this();
- if(extension!=null) addExtension(extension);
- if(description!=null) setDescription(description);
- }
-
- /**
- * Creates a file filter from the given string array.
- * Example: new ExampleFileFilter(String {"gif", "jpg"});
- *
- * Note that the "." before the extension is not needed adn
- * will be ignored.
- *
- * @see #addExtension
- */
- public EditorFileFilter(String[] filters) {
- this(filters, null);
- }
-
- /**
- * Creates a file filter from the given string array and description.
- * Example: new ExampleFileFilter(String {"gif", "jpg"}, "Gif and JPG Images");
- *
- * Note that the "." before the extension is not needed and will be ignored.
- *
- * @see #addExtension
- */
- public EditorFileFilter(String[] filters, String description) {
- this();
- for (int i = 0; i < filters.length; i++) {
- // add filters one by one
- addExtension(filters[i]);
- }
- if(description!=null) setDescription(description);
- }
-
- /**
- * Return true if this file should be shown in the directory pane,
- * false if it shouldn't.
- *
- * Files that begin with "." are ignored.
- *
- * @see #getExtension
- * @see FileFilter#accepts
- */
- public boolean accept(File f) {
- if(f != null) {
- if(f.isDirectory()) {
- return true;
- }
- String extension = getExtension(f);
- if(extension != null && filters.get(getExtension(f)) != null) {
- return true;
- };
- }
- return false;
- }
-
- /**
- * Return the extension portion of the file's name .
- *
- * @see #getExtension
- * @see FileFilter#accept
- */
- public String getExtension(File f) {
- if(f != null) {
- String filename = f.getName();
- int i = filename.lastIndexOf('.');
- if(i>0 && i<filename.length()-1) {
- return filename.substring(i+1).toLowerCase();
- };
- }
- return null;
- }
-
- /**
- * Adds a filetype "dot" extension to filter against.
- *
- * For example: the following code will create a filter that filters
- * out all files except those that end in ".jpg" and ".tif":
- *
- * ExampleFileFilter filter = new ExampleFileFilter();
- * filter.addExtension("jpg");
- * filter.addExtension("tif");
- *
- * Note that the "." before the extension is not needed and will be ignored.
- */
- public void addExtension(String extension) {
- if(filters == null) {
- filters = new Hashtable<String, FileFilter>(5);
- }
- filters.put(extension.toLowerCase(), this);
- fullDescription = null;
- }
-
-
- /**
- * Returns the human readable description of this filter. For
- * example: "JPEG and GIF Image Files (*.jpg, *.gif)"
- *
- * @see setDescription
- * @see setExtensionListInDescription
- * @see isExtensionListInDescription
- * @see FileFilter#getDescription
- */
- public String getDescription() {
- if(fullDescription == null) {
- if(description == null || isExtensionListInDescription()) {
- fullDescription = description==null ? "(" : description + " (";
- // build the description from the extension list
- Enumeration extensions = filters.keys();
- if(extensions != null) {
- fullDescription += "." + (String) extensions.nextElement();
- while (extensions.hasMoreElements()) {
- fullDescription += ", ." + (String) extensions.nextElement();
- }
- }
- fullDescription += ")";
- } else {
- fullDescription = description;
- }
- }
- return fullDescription;
- }
-
- /**
- * Sets the human readable description of this filter. For
- * example: filter.setDescription("Gif and JPG Images");
- *
- * @see setDescription
- * @see setExtensionListInDescription
- * @see isExtensionListInDescription
- */
- public void setDescription(String description) {
- this.description = description;
- fullDescription = null;
- }
-
- /**
- * Determines whether the extension list (.jpg, .gif, etc) should
- * show up in the human readable description.
- *
- * Only relevent if a description was provided in the constructor
- * or using setDescription();
- *
- * @see getDescription
- * @see setDescription
- * @see isExtensionListInDescription
- */
- public void setExtensionListInDescription(boolean b) {
- useExtensionsInDescription = b;
- fullDescription = null;
- }
-
- /**
- * Returns whether the extension list (.jpg, .gif, etc) should
- * show up in the human readable description.
- *
- * Only relevent if a description was provided in the constructor
- * or using setDescription();
- *
- * @see getDescription
- * @see setDescription
- * @see setExtensionListInDescription
- */
- public boolean isExtensionListInDescription() {
- return useExtensionsInDescription;
- }
-}
diff --git a/src/net/java/dev/typecast/app/editor/EditorMenu.java b/src/net/java/dev/typecast/app/editor/EditorMenu.java
deleted file mode 100644
index 8ab2a66..0000000
--- a/src/net/java/dev/typecast/app/editor/EditorMenu.java
+++ /dev/null
@@ -1,643 +0,0 @@
-/*
- * Typecast - The Font Development Environment
- *
- * Copyright (c) 2004 David Schweinsberg
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.java.dev.typecast.app.editor;
-
-import java.awt.*;
-import java.awt.desktop.*;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.KeyEvent;
-
-import java.io.StreamTokenizer;
-import java.io.StringReader;
-
-import java.util.ResourceBundle;
-
-import javax.swing.JMenu;
-import javax.swing.JMenuBar;
-import javax.swing.JMenuItem;
-import javax.swing.JCheckBoxMenuItem;
-import javax.swing.JSeparator;
-import javax.swing.KeyStroke;
-
-import net.java.dev.typecast.ot.OTFontCollection;
-
-/**
- * The application menu bar
- * @author <a href="mailto:[email protected]">David Schweinsberg</a>
- */
-public class EditorMenu {
-
- private Main _app;
- private ResourceBundle _rb;
- private EditorPrefs _prefs;
- private OTFontCollection _selectedFontCollection;
- private JMenuItem _closeMenuItem;
- private String _closeMenuString;
- private JCheckBoxMenuItem _previewMenuItem;
- private JCheckBoxMenuItem _showPointsMenuItem;
- private JCheckBoxMenuItem _showHintsMenuItem;
- private boolean _macPlatform;
- private int _primaryKeystrokeMask;
- private JMenu _mruMenu;
-
- /** Creates a new instance of EditorMenu */
- public EditorMenu(Main app, ResourceBundle rb, EditorPrefs prefs) {
- _app = app;
- _rb = rb;
- _prefs = prefs;
- _primaryKeystrokeMask =
- Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
- if (System.getProperty("os.name").equals("Mac OS X")) {
- _macPlatform = true;
- registerForMacOSXEvents();
- } else {
- _macPlatform = false;
- }
- }
-
- public OTFontCollection getSelectedFontCollection() {
- return _selectedFontCollection;
- }
-
- public void setSelectedFontCollection(OTFontCollection fc) {
- _selectedFontCollection = fc;
- if (_selectedFontCollection != null) {
- _closeMenuItem.setText(
- _closeMenuString +
- " \"" +
- _selectedFontCollection.getFileName() +
- "\"");
- _closeMenuItem.setEnabled(true);
- } else {
- _closeMenuItem.setText(_closeMenuString);
- _closeMenuItem.setEnabled(false);
- }
- }
-
- public boolean isPreview() {
- return _previewMenuItem.getState();
- }
-
- public boolean isShowPoints() {
- return _showPointsMenuItem.getState();
- }
-
- public boolean isShowHints() {
- return _showHintsMenuItem.getState();
- }
-
- private static void parseMenuString(String menuString, String[] tokens) {
- try {
- StreamTokenizer st = new StreamTokenizer(new StringReader(menuString));
- st.nextToken();
- if (st.sval != null) {
- tokens[0] = st.sval;
- }
- st.nextToken();
- if (st.sval != null) {
- tokens[1] = st.sval;
- }
- st.nextToken();
- if (st.sval != null) {
- tokens[2] = st.sval;
- }
- } catch (Exception e) {
- }
- }
-
- private static JMenuItem createMenuItem(
- Class<? extends JMenuItem> menuClass,
- String name,
- String mnemonic,
- String description,
- KeyStroke accelerator,
- boolean enabled,
- ActionListener al) {
- JMenuItem menuItem = null;
- try {
- menuItem = menuClass.newInstance();
- menuItem.setText(name);
- menuItem.setToolTipText(description);
- menuItem.setMnemonic(mnemonic.length() > 0 ? mnemonic.charAt(0) : 0);
- menuItem.getAccessibleContext().setAccessibleDescription(description);
- menuItem.setEnabled(enabled);
- if (accelerator != null) {
- menuItem.setAccelerator(accelerator);
- }
- if (al != null) {
- menuItem.addActionListener(al);
- }
- } catch (Exception e) {
- }
- return menuItem;
- }
-
- private static JMenuItem createMenuItem(
- String menuText,
- KeyStroke accelerator,
- boolean enabled,
- ActionListener al) {
- String[] tokens = new String[3];
- parseMenuString(menuText, tokens);
- return createMenuItem(
- JMenuItem.class,
- tokens[0],
- tokens[1],
- tokens[2],
- accelerator,
- enabled,
- al);
- }
-
- private static JCheckBoxMenuItem createCheckBoxMenuItem(
- String menuText,
- KeyStroke accelerator,
- ActionListener al) {
- String[] tokens = new String[3];
- parseMenuString(menuText, tokens);
- return (JCheckBoxMenuItem) createMenuItem(
- JCheckBoxMenuItem.class,
- tokens[0],
- tokens[1],
- tokens[2],
- accelerator,
- true,
- al);
- }
-
- private static JMenu createMenu(String menuText) {
- String[] tokens = new String[3];
- parseMenuString(menuText, tokens);
- return (JMenu) createMenuItem(JMenu.class, tokens[0], tokens[1], tokens[2], null, true, null);
- }
-
- public JMenuBar createMenuBar() {
- JMenuBar menuBar = new JMenuBar();
- menuBar.add(createFileMenu());
- menuBar.add(createEditMenu());
- menuBar.add(createViewMenu());
- //menuBar.add(createElementMenu());
- //menuBar.add(createPointsMenu());
- //menuBar.add(createMetricsMenu());
- if (_macPlatform) {
- menuBar.add(createWindowMenu());
- }
- menuBar.add(createHelpMenu());
- return menuBar;
- }
-
- private JMenu createFileMenu() {
- JMenu menu = createMenu(_rb.getString("Typecast.menu.file"));
- menu.add(createMenuItem(
- _rb.getString("Typecast.menu.file.new"),
- KeyStroke.getKeyStroke(KeyEvent.VK_N, _primaryKeystrokeMask),
- true,
- new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- }
- }));
- menu.add(createMenuItem(
- _rb.getString("Typecast.menu.file.open"),
- KeyStroke.getKeyStroke(KeyEvent.VK_O, _primaryKeystrokeMask),
- true,
- new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- _app.openFont();
- }
- }));
- _mruMenu = createMenu(_rb.getString("Typecast.menu.file.openRecent"));
- menu.add(_mruMenu);
-
- // Generate a MRU list
- buildMRU();
-
- menu.add(new JSeparator());
- menu.add(_closeMenuItem = createMenuItem(
- _rb.getString("Typecast.menu.file.close"),
- null,
- false,
- new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- _app.closeFont();
- }
- }));
- _closeMenuString = _closeMenuItem.getText();
- menu.add(createMenuItem(
- _rb.getString("Typecast.menu.file.save"),
- KeyStroke.getKeyStroke(KeyEvent.VK_S, _primaryKeystrokeMask),
- true,
- new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- }
- }));
- menu.add(createMenuItem(
- _rb.getString("Typecast.menu.file.saveAs"),
- KeyStroke.getKeyStroke(
- KeyEvent.VK_S,
- _primaryKeystrokeMask | KeyEvent.SHIFT_MASK),
- true,
- new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- }
- }));
- menu.add(createMenuItem(
- _rb.getString("Typecast.menu.file.saveAll"),
- null,
- true,
- new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- }
- }));
- menu.add(createMenuItem(
- _rb.getString("Typecast.menu.file.revertToSaved"),
- null,
- true,
- new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- }
- }));
- menu.add(createMenuItem(
- _rb.getString("Typecast.menu.file.export"),
- null,
- true,
- new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- _app.exportFont();
- }
- }));
- if (!_macPlatform) {
- menu.add(new JSeparator());
- menu.add(createMenuItem(
- _rb.getString("Typecast.menu.file.preferences"),
- null,
- true,
- new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- }
- }));
- }
-
- // Only add "Exit" to the menu if this isn't a Mac
- if (!_macPlatform) {
- menu.add(new JSeparator());
- menu.add(createMenuItem(
- _rb.getString("Typecast.menu.file.exit"),
- null,
- true,
- new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- _app.close();
- }
- }));
- }
- return menu;
- }
-
- private JMenu createEditMenu() {
- JMenu menu = createMenu(_rb.getString("Typecast.menu.edit"));
- menu.add(createMenuItem(
- _rb.getString("Typecast.menu.edit.undo"),
- KeyStroke.getKeyStroke(KeyEvent.VK_Z, _primaryKeystrokeMask),
- true,
- new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- }
- }));
- menu.add(createMenuItem(
- _rb.getString("Typecast.menu.edit.redo"),
- KeyStroke.getKeyStroke(KeyEvent.VK_Y, _primaryKeystrokeMask),
- true,
- new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- }
- }));
- menu.add(new JSeparator());
- menu.add(createMenuItem(
- _rb.getString("Typecast.menu.edit.cut"),
- KeyStroke.getKeyStroke(KeyEvent.VK_X, _primaryKeystrokeMask),
- true,
- new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- }
- }));
- menu.add(createMenuItem(
- _rb.getString("Typecast.menu.edit.copy"),
- KeyStroke.getKeyStroke(KeyEvent.VK_C, _primaryKeystrokeMask),
- true,
- new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- }
- }));
- menu.add(createMenuItem(
- _rb.getString("Typecast.menu.edit.paste"),
- KeyStroke.getKeyStroke(KeyEvent.VK_V, _primaryKeystrokeMask),
- true,
- new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- }
- }));
- menu.add(createMenuItem(
- _rb.getString("Typecast.menu.edit.clear"),
- KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0),
- true,
- new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- }
- }));
- //menu.add(createMenuItem(
- // _rb.getString("Typecast.menu.edit.copyWidths"),
- // null,
- // new ActionListener() {
- // public void actionPerformed(ActionEvent e) {
- // }
- // }));
- //menu.add(createMenuItem(
- // _rb.getString("Typecast.menu.edit.copyReference"),
- // null,
- // new ActionListener() {
- // public void actionPerformed(ActionEvent e) {
- // }
- // }));
- //menu.add(createMenuItem(
- // _rb.getString("Typecast.menu.edit.unlinkReference"),
- // null,
- // new ActionListener() {
- // public void actionPerformed(ActionEvent e) {
- // }
- // }));
- menu.add(createMenuItem(
- _rb.getString("Typecast.menu.edit.selectAll"),
- KeyStroke.getKeyStroke(KeyEvent.VK_A, _primaryKeystrokeMask),
- true,
- new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- }
- }));
- //menu.add(createMenuItem(
- // _rb.getString("Typecast.menu.edit.duplicate"),
- // KeyStroke.getKeyStroke(KeyEvent.VK_D, _primaryKeystrokeMask),
- // new ActionListener() {
- // public void actionPerformed(ActionEvent e) {
- // }
- // }));
- //menu.add(createMenuItem(
- // _rb.getString("Typecast.menu.edit.clone"),
- // null,
- // new ActionListener() {
- // public void actionPerformed(ActionEvent e) {
- // }
- // }));
- return menu;
- }
-
- private JMenu createViewMenu() {
- JMenu menu = createMenu(_rb.getString("Typecast.menu.view"));
- menu.add(_previewMenuItem = createCheckBoxMenuItem(
- _rb.getString("Typecast.menu.view.preview"),
- KeyStroke.getKeyStroke(KeyEvent.VK_L, _primaryKeystrokeMask),
- new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- _app.changeGlyphView();
- }
- }));
- menu.add(_showPointsMenuItem = createCheckBoxMenuItem(
- _rb.getString("Typecast.menu.view.showPoints"),
- KeyStroke.getKeyStroke(KeyEvent.VK_P, _primaryKeystrokeMask),
- new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- _app.changeGlyphView();
- }
- }));
- menu.add(_showHintsMenuItem = createCheckBoxMenuItem(
- _rb.getString("Typecast.menu.view.showHints"),
- KeyStroke.getKeyStroke(KeyEvent.VK_H, _primaryKeystrokeMask),
- new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- _app.changeGlyphView();
- }
- }));
- _showPointsMenuItem.setState(true);
- JMenu subMenu = createMenu(_rb.getString("Typecast.menu.view.magnification"));
- menu.add(subMenu);
- subMenu.add(createMenuItem(
- _rb.getString("Typecast.menu.view.magnification.fitInWindow"),
- KeyStroke.getKeyStroke(KeyEvent.VK_T, _primaryKeystrokeMask),
- true,
- new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- }
- }));
- subMenu.add(new JSeparator());
- subMenu.add(createMenuItem(
- _rb.getString("Typecast.menu.view.magnification.00625"),
- KeyStroke.getKeyStroke(KeyEvent.VK_1, _primaryKeystrokeMask),
- true,
- new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- }
- }));
- subMenu.add(createMenuItem(
- _rb.getString("Typecast.menu.view.magnification.01250"),
- KeyStroke.getKeyStroke(KeyEvent.VK_2, _primaryKeystrokeMask),
- true,
- new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- }
- }));
- subMenu.add(createMenuItem(
- _rb.getString("Typecast.menu.view.magnification.02500"),
- KeyStroke.getKeyStroke(KeyEvent.VK_3, _primaryKeystrokeMask),
- true,
- new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- }
- }));
- subMenu.add(createMenuItem(
- _rb.getString("Typecast.menu.view.magnification.05000"),
- KeyStroke.getKeyStroke(KeyEvent.VK_4, _primaryKeystrokeMask),
- true,
- new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- }
- }));
- subMenu.add(createMenuItem(
- _rb.getString("Typecast.menu.view.magnification.10000"),
- KeyStroke.getKeyStroke(KeyEvent.VK_5, _primaryKeystrokeMask),
- true,
- new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- }
- }));
- subMenu.add(createMenuItem(
- _rb.getString("Typecast.menu.view.magnification.20000"),
- KeyStroke.getKeyStroke(KeyEvent.VK_6, _primaryKeystrokeMask),
- true,
- new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- }
- }));
- return menu;
- }
-
- private JMenu createElementMenu() {
- JMenu menu = createMenu(_rb.getString("Typecast.menu.element"));
-
- JMenuItem menuItem = menu.add(new JMenuItem("New"));
- menuItem.addActionListener(
- new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- }
- }
- );
- return menu;
- }
-
- private JMenu createPointsMenu() {
- JMenu menu = createMenu(_rb.getString("Typecast.menu.points"));
-
- JMenuItem menuItem = menu.add(new JMenuItem("New"));
- menuItem.addActionListener(
- new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- }
- }
- );
- return menu;
- }
-
- private JMenu createMetricsMenu() {
- JMenu menu = createMenu(_rb.getString("Typecast.menu.metrics"));
-
- JMenuItem menuItem = menu.add(new JMenuItem("New"));
- menuItem.addActionListener(
- new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- }
- }
- );
- return menu;
- }
-
- private JMenu createWindowMenu() {
- JMenu menu = createMenu(_rb.getString("Typecast.menu.window"));
- menu.add(createMenuItem(
- _rb.getString("Typecast.menu.help.about"),
- null,
- true,
- new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- _app.showAbout();
- }
- }));
- return menu;
- }
-
- private JMenu createHelpMenu() {
- JMenu menu = createMenu(_rb.getString("Typecast.menu.help"));
- menu.add(createMenuItem(
- _rb.getString("Typecast.menu.help.typecast"),
- KeyStroke.getKeyStroke(KeyEvent.VK_SLASH, _primaryKeystrokeMask),
- true,
- new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- _app.showHelp();
- }
- }));
- if (!_macPlatform) {
- menu.add(new JSeparator());
- menu.add(createMenuItem(
- _rb.getString("Typecast.menu.help.about"),
- null,
- true,
- new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- _app.showAbout();
- }
- }));
- }
- return menu;
- }
-
- private void buildMRU() {
- _mruMenu.removeAll();
- for (int i = 0; i < _prefs.getMRUCount(); ++i) {
- String mru = _prefs.getMRU(i);
- if (mru != null) {
- JMenuItem menuItem = _mruMenu.add(new JMenuItem(
- mru,
- KeyEvent.VK_0 + i));
- menuItem.getAccessibleContext().setAccessibleDescription(
- "Recently used font");
- menuItem.addActionListener(
- new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- _app.loadFont(e.getActionCommand());
- }
- }
- );
- }
- }
- if (_prefs.getMRUCount() == 0) {
-
- // Add a placeholder
- JMenuItem menuItem = _mruMenu.add(new JMenuItem("Recently used files"));
- menuItem.setEnabled(false);
- }
- _mruMenu.add(new JSeparator());
- _mruMenu.add(createMenuItem(
- _rb.getString("Typecast.menu.file.openRecent.clearMenu"),
- null,
- true,
- new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- _prefs.clearMRU();
- buildMRU();
- }
- }));
- }
-
- public void addMru(String mru) {
- _prefs.addMRU(mru);
- buildMRU();
- }
-
- // Generic registration with the macOS application menu
- public void registerForMacOSXEvents() {
- Desktop desktop = Desktop.getDesktop();
- desktop.setQuitHandler(new QuitHandler() {
- @Override
- public void handleQuitRequestWith(QuitEvent e, QuitResponse response) {
- _app.close();
- }
- });
- desktop.setAboutHandler(new AboutHandler() {
- @Override
- public void handleAbout(AboutEvent e) {
- _app.showAbout();
- }
- });
- desktop.setPreferencesHandler(new PreferencesHandler() {
- @Override
- public void handlePreferences(PreferencesEvent e) {
- _app.showPreferences();
- }
- });
- }
-}
diff --git a/src/net/java/dev/typecast/app/editor/EditorPrefs.java b/src/net/java/dev/typecast/app/editor/EditorPrefs.java
deleted file mode 100644
index 054eee0..0000000
--- a/src/net/java/dev/typecast/app/editor/EditorPrefs.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * Typecast - The Font Development Environment
- *
- * Copyright (c) 2004-2007 David Schweinsberg
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.java.dev.typecast.app.editor;
-
-import java.util.ArrayList;
-import java.util.ListIterator;
-
-import java.util.prefs.Preferences;
-
-import java.awt.Point;
-import java.awt.Dimension;
-
-/**
- * A class to handle all the various application preferences
- * @author <a href="mailto:[email protected]">David Schweinsberg</a>
- */
-public class EditorPrefs {
-
- public static final int maxMRUCount = 10;
-
- // Key strings
- private static final String APP_WINDOW_POS = "app_position";
- private static final String APP_WINDOW_SIZE = "app_size";
- private static final String TREE_WIDTH = "tree_width";
- private static final String MRU_COUNT = "mru_count";
- private static final String MRU_PREFIX = "mru_";
-
- // Default values
- private static final int APP_WINDOW_POS_X_DEFAULT = 0;
- private static final int APP_WINDOW_POS_Y_DEFAULT = 0;
- private static final int APP_WINDOW_SIZE_WIDTH_DEFAULT = 640;
- private static final int APP_WINDOW_SIZE_HEIGHT_DEFAULT = 480;
- private static final int TREE_WIDTH_DEFAULT = 200;
- private static final int MRU_COUNT_DEFAULT = 0;
-
- private Point _appWindowPos;
- private Dimension _appWindowSize;
- private int _treeWidth;
- private ArrayList<String> _mru = new ArrayList<String>();
-
- /** Creates a new instance of TypecastPrefs */
- public EditorPrefs() {
- }
-
- public void load(Preferences prefs) {
- _appWindowPos = getPosition(
- prefs,
- APP_WINDOW_POS,
- new Point(APP_WINDOW_POS_X_DEFAULT, APP_WINDOW_POS_Y_DEFAULT));
- _appWindowSize = getSize(
- prefs,
- APP_WINDOW_SIZE,
- new Dimension(
- APP_WINDOW_SIZE_WIDTH_DEFAULT,
- APP_WINDOW_SIZE_HEIGHT_DEFAULT));
- _treeWidth = prefs.getInt(TREE_WIDTH, TREE_WIDTH_DEFAULT);
- int mruCount = prefs.getInt(MRU_COUNT, MRU_COUNT_DEFAULT);
- for (int i = 0; i < mruCount; ++i) {
- _mru.add(prefs.get(MRU_PREFIX + Integer.toString(i), null));
- }
- }
-
- public void save(Preferences prefs) {
- putPosition(prefs, APP_WINDOW_POS, _appWindowPos);
- putSize(prefs, APP_WINDOW_SIZE, _appWindowSize);
- prefs.putInt(TREE_WIDTH, _treeWidth);
- prefs.putInt(MRU_COUNT, getMRUCount());
- for (int i = 0; i < getMRUCount(); ++i) {
- prefs.put(MRU_PREFIX + Integer.toString(i), _mru.get(i));
- }
- }
-
- public Point getAppWindowPos() {
- return _appWindowPos;
- }
-
- public void setAppWindowPos(Point pos) {
- _appWindowPos = pos;
- }
-
- public Dimension getAppWindowSize() {
- return _appWindowSize;
- }
-
- public void setAppWindowSize(Dimension size) {
- _appWindowSize = size;
- }
-
- public int getTreeWidth() {
- return _treeWidth;
- }
-
- public void setTreeWidth(int width) {
- _treeWidth = width;
- }
-
- public int getMRUCount() {
- return _mru.size();
- }
-
- public String getMRU(int index) {
- return _mru.get(index);
- }
-
- public void addMRU(String mru) {
-
- // Is this string already in the list?
- ListIterator<String> iter = _mru.listIterator();
- while (iter.hasNext()) {
- if (iter.next().equals(mru)) {
- return;
- }
- }
-
- // Insert this file at the beginning of the list and remove any that
- // drop off the end of the list
- _mru.add(0, mru);
- if (_mru.size() > maxMRUCount) {
- _mru.remove(maxMRUCount);
- }
- }
-
- public void clearMRU() {
- _mru.clear();
- }
-
- public float getZoom() {
- return 0.25f;
- }
-
- public void setZoom(float factor) {
-
- }
-
- /**
- * Read a position string from preferences
- */
- public static Point getPosition(Preferences prefs, String keyName, Point defaultPos) {
- String position = prefs.get(
- keyName,
- defaultPos.x + "," + defaultPos.y);
- try {
- int i = position.indexOf(',');
- int x = Integer.parseInt(position.substring(0, i));
- int y = Integer.parseInt(position.substring(i + 1));
- return new Point(x, y);
- } catch(Exception e) {
- return defaultPos;
- }
- }
-
- public static void putPosition(Preferences prefs, String keyName, Point pos) {
- prefs.put(keyName, pos.x + "," + pos.y);
- }
-
- /**
- * Read a size string from preferences
- */
- public static Dimension getSize(Preferences prefs, String keyName, Dimension defaultSize) {
- String size = prefs.get(
- keyName,
- defaultSize.width + "x" + defaultSize.height);
- try {
- int i = size.indexOf('x');
- int w = Integer.parseInt(size.substring(0, i));
- int h = Integer.parseInt(size.substring(i + 1));
- return new Dimension(w, h);
- } catch(Exception e) {
- return defaultSize;
- }
- }
-
- public static void putSize(Preferences prefs, String keyName, Dimension size) {
- prefs.put(keyName, size.width + "x" + size.height);
- }
-}
diff --git a/src/net/java/dev/typecast/app/editor/GlyphPanel.java b/src/net/java/dev/typecast/app/editor/GlyphPanel.java
deleted file mode 100644
index 5aeb06e..0000000
--- a/src/net/java/dev/typecast/app/editor/GlyphPanel.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Typecast - The Font Development Environment
- *
- * Copyright (c) 2004-2015 David Schweinsberg
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.java.dev.typecast.app.editor;
-
-import java.awt.BorderLayout;
-import java.awt.Color;
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-import net.java.dev.typecast.app.framework.EditorView;
-import net.java.dev.typecast.cff.CharstringType2;
-import net.java.dev.typecast.edit.GlyphEdit;
-import net.java.dev.typecast.ot.OTFont;
-import net.java.dev.typecast.ot.T2Glyph;
-import net.java.dev.typecast.ot.TTGlyph;
-import net.java.dev.typecast.ot.table.GlyphDescription;
-
-/**
- *
- * @author <a href="mailto:[email protected]">David Schweinsberg</a>
- */
-public class GlyphPanel extends JPanel implements EditorView {
-
- private static final long serialVersionUID = 1L;
-
- private final EditorPrefs _prefs;
- private final GlyphEdit _glyphEdit = new GlyphEdit();
- private final GlyphPanelToolBar _toolBar = new GlyphPanelToolBar();
- private final GlyphPanelStatusBar _glyphPanelStatusBar =
- new GlyphPanelStatusBar();
-
- /** Creates new GlyphPanel */
- public GlyphPanel(EditorPrefs prefs) {
- _prefs = prefs;
- setName("Outline");
- setLayout(new BorderLayout());
-
- // Toolbar
- add(_toolBar, BorderLayout.NORTH);
-
- // Editor
- _glyphEdit.setBackground(Color.white);
- _glyphEdit.setScaleFactor(_prefs.getZoom());
- add(new JScrollPane(
- _glyphEdit,
- JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
- JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS),
- BorderLayout.CENTER);
-
- // Status bar
- _glyphPanelStatusBar.setGlyphEdit(_glyphEdit);
- add(_glyphPanelStatusBar, BorderLayout.SOUTH);
- }
-
- /**
- * The GlyphPanel deals with GlyphDescriptions, so the Object parameter must
- * implement the GlyphDescription interface.
- */
- @Override
- public void setModel(OTFont font, Object obj) {
- if (obj instanceof GlyphDescription) {
- _glyphEdit.setFont(font);
- GlyphDescription gd = (GlyphDescription) obj;
- _glyphEdit.setGlyph(new TTGlyph(
- gd,
- font.getHmtxTable().getLeftSideBearing(gd.getGlyphIndex()),
- font.getHmtxTable().getAdvanceWidth(gd.getGlyphIndex())));
- }
- else if (obj instanceof CharstringType2) {
- _glyphEdit.setFont(font);
- CharstringType2 cs = (CharstringType2) obj;
- _glyphEdit.setGlyph(new T2Glyph(
- cs,
- font.getHmtxTable().getLeftSideBearing(cs.getIndex()),
- font.getHmtxTable().getAdvanceWidth(cs.getIndex())));
- }
- }
-
- public GlyphEdit getGlyphEdit() {
- return _glyphEdit;
- }
-
- public void setProperties() {
- _prefs.setZoom((float)_glyphEdit.getScaleFactor());
- }
-}
diff --git a/src/net/java/dev/typecast/app/editor/GlyphPanelStatusBar.java b/src/net/java/dev/typecast/app/editor/GlyphPanelStatusBar.java
deleted file mode 100644
index e90ebaa..0000000
--- a/src/net/java/dev/typecast/app/editor/GlyphPanelStatusBar.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Typecast - The Font Development Environment
- *
- * Copyright (c) 2004 David Schweinsberg
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.java.dev.typecast.app.editor;
-
-import java.awt.GridLayout;
-
-import java.awt.event.MouseEvent;
-
-import java.net.URL;
-
-import java.util.Set;
-
-import javax.swing.ImageIcon;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.SwingConstants;
-
-import javax.swing.event.MouseInputListener;
-
-import net.java.dev.typecast.edit.GlyphEdit;
-
-import net.java.dev.typecast.ot.Point;
-
-/**
- *
- * @author <a href="mailto:[email protected]">David Schweinsberg</a>
- */
-public class GlyphPanelStatusBar extends JPanel {
-
- private static final long serialVersionUID = 1L;
-
- private GlyphEdit _glyphEdit;
- private JLabel _cursorPos;
- private JLabel _selPos;
- private JLabel _selDelta;
-
- /** Creates new GlyphEditStatusBar */
- public GlyphPanelStatusBar() {
- setLayout(new GridLayout(1, 5));
- URL iconURL = ClassLoader.getSystemResource("images/cursor_16x16.gif");
- add(_cursorPos = new JLabel(
- "0, 0",
- new ImageIcon(iconURL),
- SwingConstants.LEFT));
- iconURL = ClassLoader.getSystemResource("images/point_selected_16.gif");
- add(_selPos = new JLabel(
- "---, ---",
- new ImageIcon(iconURL),
- SwingConstants.LEFT));
- iconURL = ClassLoader.getSystemResource(
- "images/point_and_cursor_16.gif");
- add(_selDelta = new JLabel(
- "---, ---",
- new ImageIcon(iconURL),
- SwingConstants.LEFT));
- }
-
- public GlyphEdit getGlyphEdit() {
- return _glyphEdit;
- }
-
- public void setGlyphEdit(GlyphEdit glyphEdit) {
- _glyphEdit = glyphEdit;
-
- // Create a MouseInputListener to track the location of the cursor
- // within the GlyphEdit window
- MouseInputListener mil = new MouseInputListener() {
- public void mouseClicked(MouseEvent e) { }
- public void mouseEntered(MouseEvent e) { }
- public void mouseExited(MouseEvent e) { }
- public void mousePressed(MouseEvent e) {
- setCursorStatus(e.getX(), e.getY());
- setSelectedStatus();
- }
- public void mouseReleased(MouseEvent e) { }
- public void mouseDragged(MouseEvent e) {
- setCursorStatus(e.getX(), e.getY());
- setSelectedStatus();
- }
- public void mouseMoved(MouseEvent e) {
- setCursorStatus(e.getX(), e.getY());
- }
- };
- glyphEdit.addMouseListener(mil);
- glyphEdit.addMouseMotionListener(mil);
- }
-
- private void setCursorStatus(int x, int y) {
- double f = _glyphEdit.getScaleFactor();
- int x1 = (int)((double) x / f - (double) _glyphEdit.getTranslateX());
- int y1 = -(int)((double) y / f - (double) _glyphEdit.getTranslateY());
-
- // Cursor position
- _cursorPos.setText(x1 + ", " + y1);
-
- // Difference between cursor and selected point
- Set s = _glyphEdit.getSelectedPoints();
- if (s.size() == 1) {
- Point p = (Point) s.iterator().next();
- _selDelta.setText((x1 - p.x) + ", " + (y1 - p.y));
- } else {
- _selDelta.setText("---, ---");
- }
- }
-
- private void setSelectedStatus() {
- Set s = _glyphEdit.getSelectedPoints();
- if (s.size() == 1) {
- Point p = (Point) s.iterator().next();
- _selPos.setText(p.x + ", " + p.y);
- } else {
- _selPos.setText("---, ---");
- }
- }
-}
diff --git a/src/net/java/dev/typecast/app/editor/GlyphPanelToolBar.java b/src/net/java/dev/typecast/app/editor/GlyphPanelToolBar.java
deleted file mode 100644
index 22f229d..0000000
--- a/src/net/java/dev/typecast/app/editor/GlyphPanelToolBar.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Typecast - The Font Development Environment
- *
- * Copyright (c) 2004-2016 David Schweinsberg
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.java.dev.typecast.app.editor;
-
-import java.net.URL;
-import javax.swing.ImageIcon;
-import javax.swing.JButton;
-import javax.swing.JToolBar;
-
-/**
- *
- * @author <a href="mailto:[email protected]">David Schweinsberg</a>
- */
-public class GlyphPanelToolBar extends JToolBar {
-
- private static final long serialVersionUID = 1L;
-
- /** Creates new GlyphPanelToolBar */
- public GlyphPanelToolBar() {
- URL iconURL = ClassLoader.getSystemResource("images/cursor_16x16.gif");
- JButton button = new JButton(new ImageIcon(iconURL));
- add(button);
-
- iconURL = ClassLoader.getSystemResource("images/crosshair_16x16.gif");
- button = new JButton(new ImageIcon(iconURL));
- add(button);
-
- iconURL = ClassLoader.getSystemResource("toolbarButtonGraphics/general/ZoomIn16.gif");
- button = new JButton(new ImageIcon(iconURL));
- add(button);
-
- iconURL = ClassLoader.getSystemResource("toolbarButtonGraphics/general/ZoomOut16.gif");
- button = new JButton(new ImageIcon(iconURL));
- add(button);
- }
-
-}
diff --git a/src/net/java/dev/typecast/app/editor/MacOSFilenameFilter.java b/src/net/java/dev/typecast/app/editor/MacOSFilenameFilter.java
deleted file mode 100644
index c88de5a..0000000
--- a/src/net/java/dev/typecast/app/editor/MacOSFilenameFilter.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Typecast - The Font Development Environment
- *
- * Copyright (c) 2004-2007 David Schweinsberg
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.java.dev.typecast.app.editor;
-
-import java.io.BufferedInputStream;
-import java.io.DataInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FilenameFilter;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-
-import net.java.dev.typecast.ot.mac.ResourceHeader;
-import net.java.dev.typecast.ot.mac.ResourceMap;
-import net.java.dev.typecast.ot.mac.ResourceType;
-
-/**
- * A FilenameFilter implementation that includes font files based on their
- * extension and also by the presence of fonts in the resource fork.
- * @author <a href="mailto:[email protected]">David Schweinsberg</a>
- */
-public class MacOSFilenameFilter implements FilenameFilter {
-
- /** Creates a new instance of MacOSFilenameFilter */
- public MacOSFilenameFilter() {
- }
-
- public boolean accept(File dir, String name) {
- if (name.endsWith(".ttf")
- || name.endsWith(".ttc")
- || name.endsWith(".otf")
- || name.endsWith(".dfont")
- || name.endsWith(".suit")) {
- return true;
- } else if (name.indexOf('.') == -1) {
-
- // This filename has no extension, so we'll look into any
- // resource fork. But first, if there is data in the data fork,
- // then we'll reject this as a font file
- File dataFork = new File(dir, name);
- if (dataFork.length() > 0) {
- return false;
- }
-
- // OK, go for the resource fork
- File file = new File(dataFork, "..namedfork/rsrc");
- if (file.exists() && file.length() > 0) {
- try {
- DataInputStream dis = new DataInputStream(
- new BufferedInputStream(
- new FileInputStream(file), (int) file.length()));
- dis.mark((int) file.length());
-
- // Is this a Macintosh font suitcase resource?
- ResourceHeader resourceHeader = new ResourceHeader(dis);
-
- // Seek to the map offset and read the map
- dis.reset();
- dis.skip(resourceHeader.getMapOffset());
- ResourceMap map = new ResourceMap(dis);
-
- // Get any 'sfnt' resources
- ResourceType resourceType = map.getResourceType("sfnt");
- dis.close();
- if (resourceType != null) {
- return true;
- }
- } catch (FileNotFoundException e) {
- // ignore
- } catch (IOException e) {
- // ignore
- }
- }
- }
- return false;
- }
-}
diff --git a/src/net/java/dev/typecast/app/editor/Main.java b/src/net/java/dev/typecast/app/editor/Main.java
deleted file mode 100644
index e0db0d7..0000000
--- a/src/net/java/dev/typecast/app/editor/Main.java
+++ /dev/null
@@ -1,427 +0,0 @@
-/*
- * Typecast - The Font Development Environment
- *
- * Copyright (c) 2004-2016 David Schweinsberg
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.java.dev.typecast.app.editor;
-
-
-import java.awt.Cursor;
-import java.awt.FileDialog;
-import java.awt.HeadlessException;
-import java.awt.event.WindowAdapter;
-import java.awt.event.WindowEvent;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.ResourceBundle;
-import java.util.prefs.Preferences;
-import javax.swing.JFileChooser;
-import javax.swing.JFrame;
-import javax.swing.JOptionPane;
-import javax.swing.JScrollPane;
-import javax.swing.JSplitPane;
-import javax.swing.JTabbedPane;
-import javax.swing.JTree;
-import javax.swing.ToolTipManager;
-import javax.swing.UIManager;
-import javax.swing.UnsupportedLookAndFeelException;
-import javax.swing.event.TreeSelectionEvent;
-import javax.swing.event.TreeSelectionListener;
-import javax.swing.tree.DefaultTreeModel;
-import javax.swing.tree.TreePath;
-import net.java.dev.typecast.edit.CharacterMap;
-import net.java.dev.typecast.exchange.Exporter;
-import net.java.dev.typecast.exchange.SVGExporter;
-import net.java.dev.typecast.ot.OTFont;
-import net.java.dev.typecast.ot.OTFontCollection;
-import net.java.dev.typecast.ot.table.GlyphDescription;
-import net.java.dev.typecast.ot.table.TableException;
-
-/**
- * @author <a href="mailto:[email protected]">David Schweinsberg</a>
- */
-public class Main {
-
- private EditorMenu _menu;
- private JFrame _frame;
- private JTree _tree;
- private JSplitPane _splitPane;
- private DefaultTreeModel _treeModel;
- private ArrayList<OTFontCollection> _fontCollections = new ArrayList<>();
- private EditorPrefs _appPrefs = new EditorPrefs();
- private JTabbedPane _tabbedPane;
- private GlyphPanel _glyphPane;
- private Object _treeSelection;
- private ResourceBundle _rb;
- private OTFont _selectedFont = null;
- private TableTreeNode _selectedCollectionNode;
-
- /**
- * Typecast constructor.
- */
- public Main() {
-
- // Before loading Swing, set macOS-specific properties
- System.setProperty("apple.awt.application.name", "Typecast");
- System.setProperty("apple.laf.useScreenMenuBar", "true");
-
- // Show a splash screen whilst we load up
- Splash splash = new Splash();
- splash.setVisible(true);
-
- // TESTING: The following will be moved to a properties file
-// _modelViewPairs.add(new ModelViewPair(
-// GlyfDescript.class,
-// GlyphPanel.class));
-// _modelViewPairs.add(new ModelViewPair(
-// net.java.dev.typecast.ot.table.CmapFormat.class,
-// CharacterMap.class));
-
- try {
- // Set the L&F appropriate for the OS
- // (Mac automatically selects Aqua, but Windows goes for Metal)
- if (System.getProperty("os.name").startsWith("Windows")) {
- UIManager.setLookAndFeel(
- "com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
- }
-
- // Load the user's application preferences
- _appPrefs.load(Preferences.userNodeForPackage(getClass()));
-
- // Load the resource bundle
- _rb = ResourceBundle.getBundle("net/java/dev/typecast/app/editor/Main");
-
- _frame = new JFrame(
- _rb.getString("Typecast.title") +
- " " +
- _rb.getString("Typecast.version"));
- _frame.setLocation(_appPrefs.getAppWindowPos());
- _frame.setPreferredSize(_appPrefs.getAppWindowSize());
-
- _treeModel = (DefaultTreeModel) TableTreeBuilder.createTypecastTreeModel();
- _tree = new JTree(_treeModel);
- _tree.setRootVisible(false);
- _tree.setShowsRootHandles(true);
-
- // Enable tool tips for the tree, without this tool tips will not
- // be picked up
- ToolTipManager.sharedInstance().registerComponent(_tree);
-
- // Make the tree use an instance of TableTreeCellRenderer for
- // drawing
- _tree.setCellRenderer(new TableTreeCellRenderer());
-
- // Put the Tree in a scroller
- JScrollPane treePane = new JScrollPane(
- JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
- JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
- treePane.getViewport().add(_tree);
-
- treePane.setBorder(null);
-
- // Listen for selection events from the tree
- TreeSelectionListener tsl = (TreeSelectionEvent e) -> {
- TreePath selPath = e.getPath();
- if(selPath != null) {
-
- // Pick the font collection out of the path
- if (selPath.getPathCount() >= 2) {
- _selectedCollectionNode =
- (TableTreeNode) selPath.getPathComponent(1);
- _menu.setSelectedFontCollection(
- (OTFontCollection)
- _selectedCollectionNode.getUserObject());
- }
-
- // Pick the selected font out of the path
- OTFont font = null;
- if (selPath.getPathCount() >= 3) {
- TableTreeNode fontNode =
- (TableTreeNode) selPath.getPathComponent(2);
- font = (OTFont) fontNode.getUserObject();
- }
-
- // Now get the actually selected node
- TableTreeNode tn =
- (TableTreeNode) selPath.getLastPathComponent();
- selectElement(font, tn);
- }
- };
- _tree.addTreeSelectionListener(tsl);
-
- // Create a tabbed workspace
- _tabbedPane = new JTabbedPane();
-
- // Split the main frame
- _splitPane = new JSplitPane(
- JSplitPane.HORIZONTAL_SPLIT,
- treePane,
- _tabbedPane);
- _splitPane.setOneTouchExpandable(true);
- _splitPane.setDividerLocation(_appPrefs.getTreeWidth());
- _frame.getContentPane().add("Center", _splitPane);
-
- _splitPane.setBorder(null);
-
- // Create a menu bar
- _menu = new EditorMenu(this, _rb, _appPrefs);
- _frame.setJMenuBar(_menu.createMenuBar());
-
- _frame.addWindowListener(
- new WindowAdapter() {
- @Override
- public void windowClosing(WindowEvent e) {
- close();
- }
- }
- );
-
- // We're built, so make the main frame visible and hide the splash
- _frame.pack();
- _frame.setVisible(true);
- } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException | HeadlessException e) {
- JOptionPane.showMessageDialog(
- null,
- e.toString(),
- "Exception",
- JOptionPane.ERROR_MESSAGE);
- } finally {
- splash.setVisible(false);
- }
- }
-
- protected void loadFont(String pathName) {
- _frame.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
- try {
- File file = new File(pathName);
- OTFontCollection fc = OTFontCollection.create(file);
- _fontCollections.add(fc);
-
- // Create the tree to put the information in
- TableTreeBuilder.addFontTree(_treeModel, fc);
- } catch (IOException e) {
- JOptionPane.showMessageDialog(
- null,
- e.toString(),
- "I/O Exception",
- JOptionPane.ERROR_MESSAGE);
- } catch (Exception e) {
- JOptionPane.showMessageDialog(
- null,
- e.toString(),
- "Exception",
- JOptionPane.ERROR_MESSAGE);
- }
- _frame.setCursor(Cursor.getDefaultCursor());
- }
-
- public static void main(String[] args) {
- new Main();
- }
-
- /**
- * Display a file chooser and open the selected font file
- */
- protected void openFont() {
- String pathName = null;
-
- // Display a file chooser, depending on what OS we're running on
- if (System.getProperty("os.name").equals("Mac OS X")) {
- FileDialog fd = new FileDialog(_frame, "Open Font");
- fd.setFilenameFilter(new MacOSFilenameFilter());
- fd.setVisible(true);
- if (fd.getFile() != null) {
- pathName = fd.getDirectory() + fd.getFile();
- }
- } else {
- JFileChooser chooser = new JFileChooser();
-
- EditorFileFilter filter = new EditorFileFilter();
- filter.addExtension("ttf");
- filter.addExtension("ttc");
- filter.addExtension("otf");
- filter.addExtension("dfont");
- filter.setDescription("OpenType Fonts");
-
- chooser.setFileFilter(filter);
-
- if (chooser.showOpenDialog(_frame) == JFileChooser.APPROVE_OPTION) {
- pathName = chooser.getSelectedFile().getPath();
- }
- }
-
- if (pathName != null) {
- loadFont(pathName);
- _menu.addMru(pathName);
- }
- }
-
- /**
- * Close the currently selected font
- */
- protected void closeFont() {
- _fontCollections.remove(
- (OTFontCollection) _selectedCollectionNode.getUserObject());
- _treeModel.removeNodeFromParent(_selectedCollectionNode);
- selectElement(null, null);
- _menu.setSelectedFontCollection(null);
- }
-
- /**
- * At this time the only format we export to is SVG
- */
- protected void exportFont() {
- if (_selectedFont != null) {
- JFileChooser chooser = new JFileChooser();
-
- EditorFileFilter filter = new EditorFileFilter();
- filter.addExtension("svg");
- filter.setDescription("Scalable Vector Graphics");
-
- chooser.setFileFilter(filter);
-
- if (chooser.showSaveDialog(_frame) == JFileChooser.APPROVE_OPTION) {
- try {
- try (FileOutputStream fos = new FileOutputStream(chooser.getSelectedFile().getPath())) {
- Exporter exporter = new SVGExporter(_selectedFont);
- exporter.export(fos);
- }
- } catch (IOException | TableException e) {
- JOptionPane.showMessageDialog(
- null,
- e.toString(),
- "Exception",
- JOptionPane.ERROR_MESSAGE);
- }
- }
- }
- }
-
- protected void showHelp() {
- JOptionPane.showMessageDialog(
- null,
- "Typecast currently has no help.",
- "Typecast Help",
- JOptionPane.INFORMATION_MESSAGE);
- }
-
- protected void showAbout() {
- JOptionPane.showMessageDialog(
- null,
- _rb.getString("Typecast.title") +
- " " +
- _rb.getString("Typecast.version") +
- " - " +
- _rb.getString("Typecast.shortDesc") +
- "\n" +
- _rb.getString("Typecast.copyright") +
- "\n" +
- _rb.getString("Typecast.copyright2") +
- "\n" +
- _rb.getString("Typecast.webHome"),
- _rb.getString("Typecast.about.title"),
- JOptionPane.INFORMATION_MESSAGE);
- }
-
- protected void showPreferences() {
- JOptionPane.showMessageDialog(
- null,
- "Typecast currently has no preferences page.",
- "Typecast Preferences",
- JOptionPane.INFORMATION_MESSAGE);
- }
-
- protected void close() {
-
- // Save the user's application preferences
- _appPrefs.setAppWindowPos(_frame.getLocation());
- _appPrefs.setAppWindowSize(_frame.getSize());
- _appPrefs.setTreeWidth(_splitPane.getDividerLocation());
- _appPrefs.save(Preferences.userNodeForPackage(getClass()));
-
- // End the application
- System.exit(0);
- }
-
- protected void changeGlyphView() {
- _glyphPane.getGlyphEdit().setPreview(_menu.isPreview());
- _glyphPane.getGlyphEdit().setDrawControlPoints(_menu.isShowPoints());
- _glyphPane.getGlyphEdit().setDrawHints(_menu.isShowHints());
- _glyphPane.getGlyphEdit().repaint();
- }
-
- private void selectElement(OTFont font, TableTreeNode tn) {
-
- // Note that this font is currently selected
- _selectedFont = font;
-
- Object obj = (tn != null) ? tn.getUserObject() : null;
-
- // Check that we actually have work to do
- if (_treeSelection == obj) {
- return;
- }
-
- // Configure the tabbed pane
- _tabbedPane.removeAll();
-
- // Add all the panes we're interested in
-// for (ModelViewPair p : _modelViewPairs) {
-// if (p._model.isInstance(obj)) {
-// Component view = p._view.newInstance();
-// if (view instanceof EditorView) {
-// ((EditorView)view).setModel(font, obj);
-// }
-// _tabbedPane.add(view);
-// }
-// }
-
- // Then add the panes we're interested in
- if (obj instanceof GlyphDescription
- || obj instanceof net.java.dev.typecast.cff.Charstring) {
- _glyphPane = new GlyphPanel(_appPrefs);
- _glyphPane.setModel(font, obj);
- _tabbedPane.add(_glyphPane);
- }
-
- // Character maps
- if (obj instanceof net.java.dev.typecast.ot.table.CmapFormat) {
- CharacterMap cm = new CharacterMap();
- cm.setModel(_selectedFont, obj);
- _tabbedPane.add(cm);
- }
-
- // Bitmaps
- if (obj instanceof net.java.dev.typecast.ot.table.SbixTable.GlyphDataRecord) {
- BitmapPanel bitmapPanel = new BitmapPanel();
- bitmapPanel.setName("Bitmap");
- bitmapPanel.setModel(_selectedFont, obj);
- _tabbedPane.add(bitmapPanel);
- }
-
- // All selections get a "dump" pane
- if (obj != null) {
- DumpPanel textPane = new DumpPanel();
- textPane.setName("Dump");
- textPane.setModel(_selectedFont, obj);
- _tabbedPane.add(textPane);
- }
-
- _treeSelection = obj;
- }
-}
diff --git a/src/net/java/dev/typecast/app/editor/Main.properties b/src/net/java/dev/typecast/app/editor/Main.properties
deleted file mode 100644
index 6d44a51..0000000
--- a/src/net/java/dev/typecast/app/editor/Main.properties
+++ /dev/null
@@ -1,81 +0,0 @@
-#
-# Typecast - The Font Development Environment
-#
-# Copyright (c) 2004-2016 David Schweinsberg
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-Typecast.title=Typecast
-Typecast.version=0.6.0
-Typecast.shortDesc=An OpenType Font Development Environment
-Typecast.copyright=Copyright \u00a9 2004-2015 David Schweinsberg
-Typecast.copyright2=This product includes software developed by the Apache Software Foundation (http://www.apache.org/).
-Typecast.webHome=https://github.com/dcsch/typecast
-
-Typecast.about.title=About Typecast
-
-# Menu properties
-Typecast.menu.file=File F "File menu"
-Typecast.menu.edit=Edit E "Edit menu"
-Typecast.menu.view=View V "View menu"
-#Typecast.menu.edit.clone=Clone E "Clone the selection"
-#Typecast.menu.edit.duplicate=Duplicate D "Duplicate the selection"
-Typecast.menu.edit.selectAll="Select All" A "Select everything"
-#Typecast.menu.edit.unlinkReference="Unlink Reference" N "Replace the referenced glyph with an explicit glyph"
-#Typecast.menu.edit.copyReference="Copy Reference" O "Copy a reference of the glyph to the clipboard"
-Typecast.menu.window=Window W "Window menu"
-Typecast.menu.help=Help H "Help menu"
-#Typecast.menu.metrics=Metrics M "Metrics menu"
-#Typecast.menu.points=Points P "Points menu"
-#Typecast.menu.element=Element L "Element menu"
-
-#Typecast.menu.edit.copyWidths="Copy Widths" W "Copy the character width to the clipboard"
-Typecast.menu.edit.clear=Clear L "Clear the selection"
-Typecast.menu.edit.paste=Paste P "Paste from the clipboard"
-Typecast.menu.edit.copy=Copy C "Copy the selection"
-Typecast.menu.edit.cut=Cut T "Cut the selection"
-Typecast.menu.edit.redo=Redo R "Redo the last undo"
-Typecast.menu.edit.undo=Undo U "Undo the last operation"
-
-#Typecast.menu.view.nextCharacter="Next Character" C "Next Character"
-Typecast.menu.view.magnification.02500="25%" "2" "25%"
-Typecast.menu.view.magnification.01250="12.5%" "1" "12.5%"
-Typecast.menu.view.magnification.00625="6.25%" "6" "6.25%"
-Typecast.menu.view.magnification.fitInWindow="Fit In Window" F "Fit In Window"
-Typecast.menu.view.magnification=Magnification M "Magnification"
-
-Typecast.menu.help.about="About Typecast" A "About Typecast"
-Typecast.menu.help.typecast="Typecast Help" T "Typecast Help"
-
-Typecast.menu.view.magnification.20000="200%" "2" "200%"
-Typecast.menu.view.magnification.10000="100%" "1" "100%"
-Typecast.menu.view.magnification.05000="50%" "5" "50%"
-Typecast.menu.view.showPoints="Show Points" S "Show Points"
-Typecast.menu.view.showHints="Show Hints" H "Show Hints"
-Typecast.menu.view.preview=Preview P "Preview"
-
-Typecast.menu.file.new=New N "Create a new font"
-Typecast.menu.file.open=Open... O "Open an existing font"
-Typecast.menu.file.openRecent="Open Recent" R "Open a recently used font"
-Typecast.menu.file.openRecent.clearMenu="Clear Menu" C "Clear the list of recently used fonts"
-#Typecast.menu.file.mru=Recently used font
-Typecast.menu.file.close=Close C "Close the selected font"
-Typecast.menu.file.save=Save S "Save the selected font"
-Typecast.menu.file.saveAs="Save As..." A "Save the selected font with a new file name"
-Typecast.menu.file.saveAll="Save All" L "Save all modified fonts"
-Typecast.menu.file.revertToSaved="Revert to Saved" R "Revert to the saved version of the font"
-Typecast.menu.file.export="Export..." E "Export the selected font"
-Typecast.menu.file.preferences=Preferences P "Show the preferences dialog"
-Typecast.menu.file.exit=Exit X "Exit Typecast"
-
diff --git a/src/net/java/dev/typecast/app/editor/Splash.java b/src/net/java/dev/typecast/app/editor/Splash.java
deleted file mode 100644
index bcaed4b..0000000
--- a/src/net/java/dev/typecast/app/editor/Splash.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Typecast - The Font Development Environment
- *
- * Copyright (c) 2004 David Schweinsberg
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.java.dev.typecast.app.editor;
-
-import java.awt.Dimension;
-import java.awt.Image;
-import java.awt.Toolkit;
-
-import java.net.URL;
-
-import javax.swing.JWindow;
-
-/**
- *
- * @author <a href="mailto:[email protected]">David Schweinsberg</a>
- */
-public class Splash extends JWindow {
-
- private static final long serialVersionUID = 1L;
-
- private Image image;
-
- /** Creates new Splash */
- public Splash() {
- Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
- URL imageURL = ClassLoader.getSystemResource("images/Typecast.gif");
- image = Toolkit.getDefaultToolkit().getImage(imageURL);
- setSize(300, 480);
- setLocation(d.width/2 - 150, d.height/2 - 240);
- }
-
- public void paint(java.awt.Graphics graphics) {
- graphics.drawImage(image, 0, 0, this);
- }
-}
diff --git a/src/net/java/dev/typecast/app/editor/TableTreeBuilder.java b/src/net/java/dev/typecast/app/editor/TableTreeBuilder.java
deleted file mode 100644
index 732b95e..0000000
--- a/src/net/java/dev/typecast/app/editor/TableTreeBuilder.java
+++ /dev/null
@@ -1,329 +0,0 @@
-/*
- * Typecast - The Font Development Environment
- *
- * Copyright (c) 2004-2016 David Schweinsberg
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.java.dev.typecast.app.editor;
-
-import javax.swing.tree.DefaultTreeModel;
-import javax.swing.tree.TreeModel;
-import net.java.dev.typecast.cff.CffFont;
-import net.java.dev.typecast.cff.Charstring;
-import net.java.dev.typecast.cff.NameIndex;
-import net.java.dev.typecast.ot.OTFont;
-import net.java.dev.typecast.ot.OTFontCollection;
-import net.java.dev.typecast.ot.table.CffTable;
-import net.java.dev.typecast.ot.table.CmapIndexEntry;
-import net.java.dev.typecast.ot.table.CmapTable;
-import net.java.dev.typecast.ot.table.DirectoryEntry;
-import net.java.dev.typecast.ot.table.Feature;
-import net.java.dev.typecast.ot.table.GlyfCompositeComp;
-import net.java.dev.typecast.ot.table.GlyfCompositeDescript;
-import net.java.dev.typecast.ot.table.GlyfDescript;
-import net.java.dev.typecast.ot.table.GlyfTable;
-import net.java.dev.typecast.ot.table.GsubTable;
-import net.java.dev.typecast.ot.table.ID;
-import net.java.dev.typecast.ot.table.LangSys;
-import net.java.dev.typecast.ot.table.Lookup;
-import net.java.dev.typecast.ot.table.LookupSubtable;
-import net.java.dev.typecast.ot.table.NameRecord;
-import net.java.dev.typecast.ot.table.NameTable;
-import net.java.dev.typecast.ot.table.PostTable;
-import net.java.dev.typecast.ot.table.SbixTable;
-import net.java.dev.typecast.ot.table.Script;
-import net.java.dev.typecast.ot.table.Table;
-
-/**
- * @author <a href="mailto:[email protected]">David Schweinsberg</a>
- */
-public class TableTreeBuilder {
-
- private static void addCmapTable(TableTreeNode parent, CmapTable ct) {
-
- int lastPlatformId = -1;
- int lastEncodingId = -1;
- TableTreeNode platformNode = null;
- TableTreeNode encodingNode = null;
-
- for (int i = 0; i < ct.getNumTables(); i++) {
- CmapIndexEntry cie = ct.getCmapIndexEntry(i);
-
- // Have we created the proper grouping?
- if (lastPlatformId != cie.getPlatformId()) {
- lastPlatformId = cie.getPlatformId();
- lastEncodingId = -1;
- String s = "Platform ID: " + cie.getPlatformId() + " (" +
- ID.getPlatformName((short) cie.getPlatformId()) + ")";
- platformNode = createNode(s, null);
- parent.add(platformNode);
- }
- if (lastEncodingId != cie.getEncodingId()) {
- lastEncodingId = cie.getEncodingId();
- String s = "Encoding ID: " + cie.getEncodingId() + " (" +
- ID.getEncodingName(
- (short) cie.getPlatformId(),
- (short) cie.getEncodingId()) + ")";
- encodingNode = createNode(s, cie.getFormat());
- platformNode.add(encodingNode);
- }
- }
- }
-
- private static void addNameTable(TableTreeNode parent, NameTable nt) {
-
- short lastPlatformId = -1;
- short lastEncodingId = -1;
- short lastLanguageId = -1;
- TableTreeNode platformNode = null;
- TableTreeNode encodingNode = null;
- TableTreeNode languageNode = null;
-
- for (int i = 0; i < nt.getNumberOfNameRecords(); i++) {
- NameRecord nr = nt.getRecord(i);
-
- // Have we created the proper grouping?
- if (lastPlatformId != nr.getPlatformId()) {
- lastPlatformId = nr.getPlatformId();
- lastEncodingId = -1;
- lastLanguageId = -1;
-// String s = "Platform ID: " + lastPlatformId;
- String s = "Platform ID: " + nr.getPlatformId() + " (" +
- ID.getPlatformName(nr.getPlatformId()) + ")";
- platformNode = createNode(s, null);
- parent.add(platformNode);
- }
- if (lastEncodingId != nr.getEncodingId()) {
- lastEncodingId = nr.getEncodingId();
- lastLanguageId = -1;
-// String s = "Encoding ID: " + lastEncodingId;
- String s = "Encoding ID: " + nr.getEncodingId() + " (" +
- ID.getEncodingName(nr.getPlatformId(), nr.getEncodingId()) + ")";
- encodingNode = createNode(s, null);
- platformNode.add(encodingNode);
- }
- if (lastLanguageId != nr.getLanguageId()) {
- lastLanguageId = nr.getLanguageId();
-// String s = "Language ID: " + lastLanguageId;
- String s = "Language ID: " + nr.getLanguageId() + " (" +
- ID.getLanguageName(nr.getPlatformId(), nr.getLanguageId()) + ")";
- languageNode = createNode(s, null);
- encodingNode.add(languageNode);
- }
- String s = "" + nr.getNameId() + " (" + ID.getNameName(nr.getNameId()) + ")";
-// TypecastTreeNode node = createNode(Integer.toString(nr.getNameId()), nr);
- TableTreeNode node = createNode(s, nr);
- languageNode.add(node);
- }
- }
-
- private static void addFeatures(TableTreeNode parent, GsubTable gt, LangSys ls) {
- for (int i = 0; i < ls.getFeatureCount(); i++) {
- int index = ls.getFeatureIndex(i);
- String featureTag = gt.getFeatureList().getFeatureRecord(index).getTagAsString();
- Feature f = gt.getFeatureList().getFeature(index);
- TableTreeNode featureNode = new TableTreeNode(featureTag, f);
- parent.add(featureNode);
-
- // Add feature lookups
- for (int j = 0; j < f.getLookupCount(); j++) {
- Lookup l = gt.getLookupList().getLookup(f.getLookupListIndex(j));
- String type = GsubTable.lookupTypeAsString(l.getType());
- TableTreeNode lookupNode = new TableTreeNode(type, l);
- featureNode.add(lookupNode);
-
- // Add lookup subtables
- for (int k = 0; k < l.getSubtableCount(); k++) {
- LookupSubtable lsub = l.getSubtable(k);
-
- // For some reason, lsub can be null
- // TODO: find out why
- if (lsub != null) {
- TableTreeNode lsubNode = new TableTreeNode(
- lsub.getTypeAsString(),
- lsub);
- lookupNode.add(lsubNode);
- }
- }
- }
- }
- }
-
- private static void addGsubTable(TableTreeNode parent, GsubTable gt) {
-
- for (int i = 0; i < gt.getScriptList().getScriptCount(); i++) {
- String tag = gt.getScriptList().getScriptRecord(i).getTagAsString();
- Script s = gt.getScriptList().getScript(i);
- TableTreeNode scriptNode = new TableTreeNode(tag, s);
- parent.add(scriptNode);
-
- // Add the default LangSys node
- TableTreeNode langSysNode = new TableTreeNode(
- "default",
- s.getDefaultLangSys());
- scriptNode.add(langSysNode);
- addFeatures(langSysNode, gt, s.getDefaultLangSys());
-
- // Add any additional ones
- for (int j = 0; j < s.getLangSysCount(); j++) {
- String langSysTag = s.getLangSysRecord(j).getTagAsString();
- LangSys ls = s.getLangSys(j);
- langSysNode = new TableTreeNode(langSysTag, ls);
- scriptNode.add(langSysNode);
- addFeatures(langSysNode, gt, ls);
- }
- }
- }
-
- private static void addGlyfComposite(OTFont font, TableTreeNode parent, GlyfCompositeDescript gcd) {
- PostTable postTable = (PostTable) font.getTable(Table.post);
- for (int i = 0; i < gcd.getComponentCount(); i++) {
- GlyfCompositeComp gcc = gcd.getComponent(i);
- parent.add(new TableTreeNode(
- String.valueOf(gcc.getGlyphIndex()) +
- ((postTable.getVersion() == 0x00020000) ?
- (" " + postTable.getGlyphName(gcc.getGlyphIndex())) :
- ""),
- gcc,
- i));
- }
- }
-
- private static void addGlyfTable(OTFont font, TableTreeNode parent, GlyfTable gt) {
- PostTable postTable = (PostTable) font.getTable(Table.post);
- for (int i = 0; i < font.getNumGlyphs(); i++) {
- GlyfDescript gd = gt.getDescription(i);
- TableTreeNode n = new TableTreeNode(
- String.valueOf(i) +
- ((postTable.getVersion() == 0x00020000) ?
- (" " + postTable.getGlyphName(i)) :
- ""),
- gd,
- i);
- parent.add(n);
- if ((gd != null) && gd.isComposite()) {
-
- // We need to add the constituent glyphs
- addGlyfComposite(font, n, (GlyfCompositeDescript) gd);
- }
- }
- }
-
- private static void addCffFont(
- OTFont font,
- TableTreeNode parent,
- CffFont cf) {
- for (int i = 0; i < cf.getCharstringCount(); ++i) {
- Charstring cs = cf.getCharstring(i);
- TableTreeNode n = new TableTreeNode(
- String.valueOf(i) + " " + cs.getName(),
- cs,
- i);
- parent.add(n);
- }
- }
-
- private static void addCffTable(OTFont font, TableTreeNode parent, CffTable ct) {
- NameIndex ni = ct.getNameIndex();
- for (int i = 0; i < ni.getCount(); ++i) {
- TableTreeNode n = new TableTreeNode(
- ni.getName(i),
- ni,
- i);
- parent.add(n);
- addCffFont(font, n, ct.getFont(i));
- }
- }
-
- private static void addSbixStrike(OTFont font, TableTreeNode parent, SbixTable.Strike strike) {
- int i = 0;
- for (SbixTable.GlyphDataRecord gdr : strike.getGlyphDataRecords()) {
- TableTreeNode n = new TableTreeNode(
- String.valueOf(i),
- gdr,
- i++);
- parent.add(n);
- }
- }
-
- private static void addSbixTable(OTFont font, TableTreeNode parent, SbixTable sbix) {
- int i = 0;
- for (SbixTable.Strike strike : sbix.getStrikes()) {
- TableTreeNode n = new TableTreeNode(
- strike.toString(),
- strike,
- i++);
- parent.add(n);
- addSbixStrike(font, n, strike);
- }
- }
-
- private static void addTableDirectoryEntry(OTFont font, TableTreeNode parent, DirectoryEntry de) {
- TableTreeNode node = createNode(de.getTagAsString(), font.getTable(de.getTag()));
- parent.add(node);
- switch (de.getTag()) {
- case Table.name:
- addNameTable(node, (NameTable) font.getTable(Table.name));
- break;
- case Table.cmap:
- addCmapTable(node, (CmapTable) font.getTable(Table.cmap));
- break;
- case Table.glyf:
- addGlyfTable(font, node, (GlyfTable) font.getTable(Table.glyf));
- break;
- case Table.CFF:
- addCffTable(font, node, (CffTable) font.getTable(Table.CFF));
- break;
- case Table.GSUB:
- addGsubTable(node, (GsubTable) font.getTable(Table.GSUB));
- break;
- case Table.sbix:
- addSbixTable(font, node, (SbixTable) font.getTable(Table.sbix));
- break;
- default:
- break;
- }
- }
-
- public static void addFontTree(TreeModel treeModel, OTFontCollection fc) {
-
- TableTreeNode fcNode = createNode(fc.getPathName(), fc);
- ((TableTreeNode) treeModel.getRoot()).add(fcNode);
-
- // Add each font in this collection
- for (int i = 0; i < fc.getFontCount(); i++) {
- OTFont font = fc.getFont(i);
- TableTreeNode node = createNode(
- font.getNameTable().getRecordString(ID.nameFullFontName),
- font);
- fcNode.add(node);
- for (int j = 0; j < font.getTableDirectory().getNumTables(); j++) {
- DirectoryEntry de = font.getTableDirectory().getEntry(j);
- addTableDirectoryEntry(font, node, de);
- }
- }
- ((DefaultTreeModel) treeModel).reload();
- }
-
- public static TreeModel createTypecastTreeModel() {
- TableTreeNode node = createNode("Root", null);
- TreeModel treeModel = new DefaultTreeModel(node);
- return treeModel;
- }
-
- private static TableTreeNode createNode(String name, Object obj) {
- return new TableTreeNode(name, obj);
- }
-}
diff --git a/src/net/java/dev/typecast/app/editor/TableTreeCellRenderer.java b/src/net/java/dev/typecast/app/editor/TableTreeCellRenderer.java
deleted file mode 100644
index ef23909..0000000
--- a/src/net/java/dev/typecast/app/editor/TableTreeCellRenderer.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Typecast - The Font Development Environment
- *
- * Copyright (c) 2004 David Schweinsberg
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.java.dev.typecast.app.editor;
-
-import java.awt.Font;
-import java.awt.Graphics;
-import java.awt.SystemColor;
-
-import javax.swing.Icon;
-import javax.swing.JLabel;
-import javax.swing.JTree;
-
-import javax.swing.tree.TreeCellRenderer;
-
-/**
- * @author <a href="mailto:[email protected]">David Schweinsberg</a>
- */
-public class TableTreeCellRenderer extends JLabel implements TreeCellRenderer {
-
- private static final long serialVersionUID = 1L;
-
- private boolean _selected;
- private Font font = new java.awt.Font("SansSerif", java.awt.Font.PLAIN, 12);
-
- public java.awt.Component getTreeCellRendererComponent(
- JTree tree,
- Object value,
- boolean selected,
- boolean expanded,
- boolean leaf,
- int row,
- boolean hasFocus) {
-
- String str = tree.convertValueToText(
- value,
- selected,
- expanded,
- leaf,
- row,
- hasFocus);
- setFont(font);
- setText(str);
- setToolTipText(str);
- if (leaf) {
- setIcon(null);
- } else {
- setIcon(null);
- }
- setForeground(
- selected ?
- SystemColor.textHighlightText :
- SystemColor.textText);
- _selected = selected;
- return this;
- }
-
- public void paint(Graphics g) {
- if (_selected) {
- g.setColor(SystemColor.textHighlight);
- } else if(getParent() != null) {
- g.setColor(getParent().getBackground());
- } else {
- g.setColor(getBackground());
- }
- Icon icon = getIcon();
- int offset = 0;
- if (icon != null && getText() != null) {
- offset = icon.getIconWidth() + getIconTextGap();
- }
- g.fillRect(offset, 0, getWidth() - 1 - offset, getHeight() - 1);
- super.paint(g);
- }
-}
diff --git a/src/net/java/dev/typecast/app/editor/TableTreeNode.java b/src/net/java/dev/typecast/app/editor/TableTreeNode.java
deleted file mode 100644
index 7718eef..0000000
--- a/src/net/java/dev/typecast/app/editor/TableTreeNode.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Typecast - The Font Development Environment
- *
- * Copyright (c) 2004-2016 David Schweinsberg
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.java.dev.typecast.app.editor;
-
-/**
- *
- * @author <a href="mailto:[email protected]">David Schweinsberg</a>
- */
-public class TableTreeNode extends javax.swing.tree.DefaultMutableTreeNode {
-
- private static final long serialVersionUID = 1L;
-
- private String _nodeName;
- private int _index;
-
- /** Creates new TableTreeNode */
- public TableTreeNode(String nodeName, Object userObject, int index) {
- super(userObject);
- _nodeName = nodeName;
- _index = index;
- }
-
- public TableTreeNode(String nodeName, Object userObject) {
- this(nodeName, userObject, -1);
- }
-
- public int getIndex() {
- return _index;
- }
-
- public String toString() {
- return _nodeName;
- }
-}
diff --git a/src/net/java/dev/typecast/app/framework/EditorView.java b/src/net/java/dev/typecast/app/framework/EditorView.java
deleted file mode 100644
index f97e982..0000000
--- a/src/net/java/dev/typecast/app/framework/EditorView.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Typecast - The Font Development Environment
- *
- * Copyright (c) 2004-2016 David Schweinsberg
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.java.dev.typecast.app.framework;
-
-import net.java.dev.typecast.ot.OTFont;
-
-/**
- * The standard interface for all Typecast editor "view" components.
- * @author <a href="mailto:[email protected]">David Schweinsberg</a>
- */
-public interface EditorView {
- public void setModel(OTFont font, Object obj);
-}
diff --git a/src/net/java/dev/typecast/edit/CharacterMap.java b/src/net/java/dev/typecast/edit/CharacterMap.java
deleted file mode 100644
index 5b95e02..0000000
--- a/src/net/java/dev/typecast/edit/CharacterMap.java
+++ /dev/null
@@ -1,217 +0,0 @@
-/*
- * Typecast - The Font Development Environment
- *
- * Copyright (c) 2004-2016 David Schweinsberg
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.java.dev.typecast.edit;
-
-import java.awt.Color;
-import java.awt.Component;
-import java.awt.Dimension;
-import java.awt.Font;
-import java.awt.Graphics;
-import java.awt.Graphics2D;
-import java.awt.Image;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import java.awt.event.MouseListener;
-import java.awt.geom.AffineTransform;
-import java.util.ArrayList;
-import javax.swing.AbstractListModel;
-import javax.swing.JComponent;
-import javax.swing.JList;
-import javax.swing.JScrollPane;
-import javax.swing.ListCellRenderer;
-import net.java.dev.typecast.app.framework.EditorView;
-import net.java.dev.typecast.ot.OTFont;
-import net.java.dev.typecast.ot.table.CmapFormat;
-import net.java.dev.typecast.render.GlyphImageFactory;
-
-/**
- * An editor for the character-to-glyph map, as represented in the CmapTable.
- * @author <a href="mailto:[email protected]">David Schweinsberg</a>
- */
-public class CharacterMap extends JScrollPane implements EditorView {
-
- private static final long serialVersionUID = 1L;
-
- private static final int CELL_WIDTH = 48;
- private static final int CELL_HEIGHT = 60;
-
- private AbstractListModel _listModel;
- private CmapFormat _cmapFormat;
- private OTFont _font;
- private AffineTransform _tx;
- private final Font _labelFont = new Font("SansSerif", Font.PLAIN, 10);
-
- private class Mapping {
-
- private final int _charCode;
- private final int _glyphCode;
-
- public Mapping(int charCode, int glyphCode) {
- _charCode = charCode;
- _glyphCode = glyphCode;
- }
-
- public int getCharCode() {
- return _charCode;
- }
-
- public int getGlyphCode() {
- return _glyphCode;
- }
-
- public Image getGlyphImage() {
-
- // NOTE: We're not caching the image as we can be dealing with
- // quite a lot of them
- return GlyphImageFactory.buildImage(
- _font.getGlyph(_glyphCode),
- _tx,
- CELL_WIDTH,
- CELL_HEIGHT - 10);
- }
- }
-
- private class CharListCellRenderer extends JComponent implements ListCellRenderer {
-
- private static final long serialVersionUID = 1L;
-
- private Mapping _mapping;
- private int _index;
- private boolean _isSelected;
- private final AffineTransform _imageTx =
- new AffineTransform(1.0, 0.0, 0.0, 1.0, 0.0, 0.0);
-
- /**
- * Renders each individual cell
- */
- @Override
- protected void paintComponent(Graphics g) {
- Graphics2D g2d = (Graphics2D) g;
-
- if (_isSelected) {
- g2d.setColor(Color.BLACK);
- g2d.fillRect(0, CELL_HEIGHT - 10, CELL_WIDTH, 10);
- g2d.setColor(Color.WHITE);
- } else {
- g2d.setColor(Color.WHITE);
- g2d.fillRect(0, CELL_HEIGHT - 10, CELL_WIDTH, 10);
- g2d.setColor(Color.BLACK);
- }
-
- // Draw the glyph
- g2d.drawImage(_mapping.getGlyphImage(), _imageTx, null);
-
- // Label this cell with the character code
- g2d.setFont(_labelFont);
- g2d.drawString(
- String.format("%04X", _mapping.getCharCode()),
- 1,
- CELL_HEIGHT - 1);
- }
-
- @Override
- public Component getListCellRendererComponent(
- JList list,
- Object value,
- int index,
- boolean isSelected,
- boolean cellHasFocus) {
- _mapping = (Mapping) value;
- _index = index;
- _isSelected = isSelected;
- setPreferredSize(new Dimension(CELL_WIDTH + 1, CELL_HEIGHT + 1));
- setToolTipText(String.format("Glyph ID: %d",
- _mapping.getGlyphCode()));
- return this;
- }
- }
-
- /** Creates a new instance of CharacterMap */
- public CharacterMap() {
- super(
- JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
- JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
- setName("Character Map");
- }
-
- @Override
- public void setModel(OTFont font, Object obj) {
- if (obj instanceof CmapFormat) {
- _font = font;
- _cmapFormat = (CmapFormat) obj;
-
- // Set up a list model to wrap the cmap
- _listModel = new AbstractListModel() {
-
- private static final long serialVersionUID = 1L;
- private final ArrayList<Mapping> _mappings = new ArrayList<>();
-
- {
- for (int i = 0; i < _cmapFormat.getRangeCount(); ++i) {
- CmapFormat.Range range = _cmapFormat.getRange(i);
- for (int j = range.getStartCode(); j <= range.getEndCode(); ++j) {
- _mappings.add(new Mapping(j, _cmapFormat.mapCharCode(j)));
- }
- }
- }
-
- @Override
- public Object getElementAt(int index) {
- return _mappings.get(index);
- }
-
- @Override
- public int getSize() {
- return _mappings.size();
- }
- };
-
- final JList list = new JList(_listModel);
- list.setBackground(Color.LIGHT_GRAY);
- list.setCellRenderer(new CharListCellRenderer());
- list.setLayoutOrientation(JList.HORIZONTAL_WRAP);
- list.setVisibleRowCount(
- _listModel.getSize() / 16 +
- (_listModel.getSize() % 16 > 0 ? 1 : 0));
- setViewportView(list);
-
- // Create a mouse listener so we can listen to double-clicks
- MouseListener mouseListener = new MouseAdapter() {
- @Override
- public void mouseClicked(MouseEvent e) {
- if (e.getClickCount() == 2) {
- int index = list.locationToIndex(e.getPoint());
- }
- }
- };
- list.addMouseListener(mouseListener);
-
- // int unitsPerEmBy2 = _font.getHeadTable().getUnitsPerEm() / 2;
- // int translateX = 2 * unitsPerEmBy2;
- // int translateY = 2 * unitsPerEmBy2;
-
- // How much should we scale the font to fit it into our tiny bitmap?
- double scaleFactor = 40.0 / _font.getHeadTable().getUnitsPerEm();
-
- _tx = new AffineTransform();
- _tx.translate(2, CELL_HEIGHT - 20);
- _tx.scale(scaleFactor, -scaleFactor);
- }
- }
-}
diff --git a/src/net/java/dev/typecast/edit/Command.java b/src/net/java/dev/typecast/edit/Command.java
deleted file mode 100644
index 5ac42d6..0000000
--- a/src/net/java/dev/typecast/edit/Command.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Typecast - The Font Development Environment
- *
- * Copyright (c) 2004 David Schweinsberg
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.java.dev.typecast.edit;
-
-/**
- *
- * @author <a href="mailto:[email protected]">David Schweinsberg</a>
- */
-public abstract class Command {
-
- /** Creates new Command */
- public Command() {
- }
-
- abstract void execute();
-
- abstract void unexecute();
-
-}
diff --git a/src/net/java/dev/typecast/edit/GlyphEdit.java b/src/net/java/dev/typecast/edit/GlyphEdit.java
deleted file mode 100644
index a70d1e7..0000000
--- a/src/net/java/dev/typecast/edit/GlyphEdit.java
+++ /dev/null
@@ -1,339 +0,0 @@
-/*
- * Typecast - The Font Development Environment
- *
- * Copyright (c) 2004-2016 David Schweinsberg
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.java.dev.typecast.edit;
-
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.Graphics;
-import java.awt.Graphics2D;
-import java.awt.event.MouseEvent;
-import java.awt.geom.AffineTransform;
-import java.awt.geom.GeneralPath;
-import java.awt.geom.Line2D;
-import java.awt.geom.Rectangle2D;
-import java.util.HashSet;
-import java.util.Set;
-import javax.swing.JPanel;
-import javax.swing.Scrollable;
-import javax.swing.event.MouseInputListener;
-import net.java.dev.typecast.ot.Glyph;
-import net.java.dev.typecast.ot.OTFont;
-import net.java.dev.typecast.ot.Point;
-import net.java.dev.typecast.ot.T2Glyph;
-import net.java.dev.typecast.render.GlyphPathFactory;
-
-/**
- * The glyph editor. The user will perform operations on the glyph within this
- * window using a variety of tools derived from {@link Tool Tool}.
- * @author <a href="mailto:[email protected]">David Schweinsberg</a>
- */
-public class GlyphEdit extends JPanel implements Scrollable {
-
- private static final long serialVersionUID = 1L;
-
- private Glyph _glyph = null;
- private OTFont _font = null;
- private Tool _tool = null;
- private GeneralPath _glyphPath;
-
- private int _translateX = 0;
- private int _translateY = 0;
- private double _scaleFactor = 0.25f;
-
- private boolean _drawControlPoints = true;
- private boolean _drawHints = false;
- private boolean _preview = false;
- private final Set<Point> _selectedPoints = new HashSet<>();
-
- /** Creates new GlyphEdit */
- public GlyphEdit() {
-
- setName("ContourView");
- setLayout(null);
-
- _tool = new PointTool(this);
-
- MouseInputListener mil = new MouseInputListener() {
- @Override
- public void mouseClicked(MouseEvent e) {
- }
- @Override
- public void mouseEntered(MouseEvent e) { }
- @Override
- public void mouseExited(MouseEvent e) { }
- @Override
- public void mousePressed(MouseEvent e) {
- if (_tool != null) {
- if (e.isControlDown()) {
- _tool.pressedControl(e.getPoint());
- } else {
- _tool.pressed(e.getPoint());
- }
- }
- }
- @Override
- public void mouseReleased(MouseEvent e) {
- if (_tool != null) {
- _tool.released(e.getPoint());
- }
- }
- @Override
- public void mouseDragged(MouseEvent e) {
- if (_tool != null) {
- _tool.dragged(e.getPoint());
- }
- }
- @Override
- public void mouseMoved(MouseEvent e) { }
- };
- addMouseListener(mil);
- addMouseMotionListener(mil);
- }
-
- @Override
- public void paint(Graphics graphics) {
- super.paint(graphics);
-
- if (_glyph == null) {
- return;
- }
-
- Graphics2D g2d = (Graphics2D) graphics;
-
- int unitsPerEmBy2 = _font.getHeadTable().getUnitsPerEm() / 2;
- _translateX = 2 * unitsPerEmBy2;
- _translateY = 2 * unitsPerEmBy2;
-
- AffineTransform at = g2d.getTransform();
- AffineTransform atOriginal = new AffineTransform(at);
- at.scale(_scaleFactor, _scaleFactor);
- at.translate(_translateX, _translateY);
- at.scale(1.0, -1.0);
- g2d.setTransform(at);
-
- // Draw grid
- g2d.setPaint(Color.gray);
- g2d.draw(new Line2D.Float(-unitsPerEmBy2, 0, unitsPerEmBy2, 0));
- g2d.draw(new Line2D.Float(0, -unitsPerEmBy2, 0, unitsPerEmBy2));
-
- // Draw guides
- g2d.setPaint(Color.lightGray);
- g2d.draw(new Line2D.Float(-unitsPerEmBy2, _font.getAscent(), unitsPerEmBy2, _font.getAscent()));
- g2d.draw(new Line2D.Float(-unitsPerEmBy2, _font.getDescent(), unitsPerEmBy2, _font.getDescent()));
- g2d.draw(new Line2D.Float(_glyph.getLeftSideBearing(), -unitsPerEmBy2, _glyph.getLeftSideBearing(), unitsPerEmBy2));
- g2d.draw(new Line2D.Float(_glyph.getAdvanceWidth(), -unitsPerEmBy2, _glyph.getAdvanceWidth(), unitsPerEmBy2));
-
- if (_drawHints && _glyph instanceof T2Glyph) {
- T2Glyph t2g = (T2Glyph) _glyph;
-// Rectangle2D bounds = t2g.getBounds();
-
-// g2d.setPaint(Color.PINK);
-// g2d.fill(bounds);
-
- g2d.setPaint(Color.RED);
-
- int y = 0;
- for (Integer horiz : t2g.getHStems()) {
- y += horiz;
- g2d.draw(new Line2D.Float(0, y, 1000, y));
- }
-
- int x = 0;
- for (Integer vert : t2g.getVStems()) {
- x += vert;
- g2d.draw(new Line2D.Float(x, 0, x, 1000));
- }
- }
-
- // Draw contours
- g2d.setPaint(Color.black);
-
- if (_glyphPath == null) {
- _glyphPath = GlyphPathFactory.buildPath(_glyph);
- }
-
- // Render the glyph path
- if (_preview) {
- g2d.fill(_glyphPath);
- } else {
- g2d.draw(_glyphPath);
- }
-
- if (_drawControlPoints) {
-
- AffineTransform at2 = new AffineTransform(atOriginal);
- g2d.setTransform(at2);
-
- // Draw control points
- for (int i = 0; i < _glyph.getPointCount(); i++) {
- int x = (int) (_scaleFactor * (_glyph.getPoint(i).x + _translateX));
- int y = (int) (_scaleFactor * (-_glyph.getPoint(i).y + _translateY));
-
- // Set the point colour based on selection
- if (_selectedPoints.contains(_glyph.getPoint(i))) {
- g2d.setPaint(Color.blue);
- } else {
- g2d.setPaint(Color.black);
- }
-
- // Draw the point based on its type (on or off curve)
- if (_glyph.getPoint(i).onCurve) {
- g2d.fill(new Rectangle2D.Float(x - 2, y - 2, 5, 5));
- } else {
- g2d.draw(new Rectangle2D.Float(x - 2, y - 2, 5, 5));
- }
- g2d.drawString(Integer.toString(i), x + 4, y - 4);
- }
- }
- }
-
- public Glyph getGlyph() {
- return _glyph;
- }
-
- public void setGlyph(Glyph glyph) {
-
- _glyph = glyph;
-
- // How much space does this glyph need?
-// xOrigin = 0x5000;
-// yOrigin = 0x7080;
-
- setPreferredSize(new Dimension(1024, 1024));
- setSize(new Dimension(1024, 1024));
-
- // We have a new glyph, so repaint
- _glyphPath = null;
- invalidate();
- repaint();
- }
-
- public void modified() {
- _glyphPath = null;
- }
-
- public int getTranslateX() {
- return _translateX;
- }
-
- public void setTranslateX(int x) {
- _translateX = x;
- }
-
- public int getTranslateY() {
- return _translateY;
- }
-
- public void setTranslateY(int y) {
- _translateY = y;
- }
-
- public double getScaleFactor() {
- return _scaleFactor;
- }
-
- public void setScaleFactor(double factor) {
- _scaleFactor = factor;
- }
-
- public boolean isDrawControlPoints() {
- return _drawControlPoints;
- }
-
- public void setDrawControlPoints(boolean b) {
- _drawControlPoints = b;
- }
-
- public boolean isDrawHints() {
- return _drawHints;
- }
-
- public void setDrawHints(boolean b) {
- _drawHints = b;
- }
-
- public boolean isPreview() {
- return _preview;
- }
-
- public void setPreview(boolean b) {
- _preview = b;
- }
-
- public Set<Point> getSelectedPoints() {
- return _selectedPoints;
- }
-
-// private int transform(int p, int scale, int translate) {
-// return ((p * scale) >> 6) + translate;
-// }
-
-// public Font getFont() {
-// return font;
-// }
-
- public void setFont(OTFont font) {
- _font = font;
-// glyph = font.getGlyph(glyphIndex);
- _glyph = null;
-// repaint();
-
- // Determine the default view scaling for this font
- short unitsPerEm = _font.getHeadTable().getUnitsPerEm();
-
- _scaleFactor = 512.0 / unitsPerEm;
- }
-
- public Tool getTool() {
- return _tool;
- }
-
- public void setTool(Tool tool) {
- _tool = tool;
- }
-
-// public void executeCommand(Command command) {
-// }
-
- @Override
- public boolean getScrollableTracksViewportWidth() {
- return false;
- }
-
- @Override
- public int getScrollableBlockIncrement(java.awt.Rectangle rectangle, int param, int param2) {
- return 10;
- }
-
- @Override
- public boolean getScrollableTracksViewportHeight() {
- return false;
- }
-
- @Override
- public java.awt.Dimension getPreferredScrollableViewportSize() {
- return getPreferredSize();
- }
-
- @Override
- public int getScrollableUnitIncrement(java.awt.Rectangle rectangle, int param, int param2) {
- return 1;
- }
-
-}
diff --git a/src/net/java/dev/typecast/edit/PointTool.java b/src/net/java/dev/typecast/edit/PointTool.java
deleted file mode 100644
index 692c4a1..0000000
--- a/src/net/java/dev/typecast/edit/PointTool.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Typecast - The Font Development Environment
- *
- * Copyright (c) 2004 David Schweinsberg
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.java.dev.typecast.edit;
-
-import java.awt.Cursor;
-import java.awt.Point;
-
-import java.util.Iterator;
-import java.util.Set;
-
-import net.java.dev.typecast.edit.GlyphEdit;
-
-import net.java.dev.typecast.ot.Glyph;
-
-/**
- * A simple point selection and manipulation tool. Allows the user to select a
- * point with the cursor, to move that point by dragging, and to move the point
- * on- and off-curve by selecting the point with the control key pressed.
- * @author <a href="mailto:[email protected]">David Schweinsberg</a>
- */
-public class PointTool extends Tool {
-
- private GlyphEdit _glyphEdit;
- private Command _command;
-
- /** Creates new PointTool */
- public PointTool(GlyphEdit glyphEdit) {
- _glyphEdit = glyphEdit;
-
- // BUG: The crosshair cursor keeps coming up as a text cursor on my
- // Windows XP system :-(
- //_glyphEdit.setCursor(new Cursor(Cursor.CROSSHAIR_CURSOR));
- _glyphEdit.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
- }
-
- /**
- * Selects a point
- */
- public void pressed(Point p) {
- _glyphEdit.getSelectedPoints().clear();
- Glyph glyph = _glyphEdit.getGlyph();
- for (int i = 0; i < glyph.getPointCount(); i++) {
- net.java.dev.typecast.ot.Point gp = glyph.getPoint(i);
- double gpx = _glyphEdit.getScaleFactor() * (gp.x + _glyphEdit.getTranslateX());
- double gpy = _glyphEdit.getScaleFactor() * (-gp.y + _glyphEdit.getTranslateY());
- if (((gpx >= p.x - 2) && (gpx <= p.x + 2)) &&
- ((gpy >= p.y - 2) && (gpy <= p.y + 2))) {
- _glyphEdit.getSelectedPoints().add(gp);
- }
- }
- _glyphEdit.modified();
- _glyphEdit.repaint();
- }
-
- /**
- * Toggles the selected point between on-curve and off-curve
- */
- public void pressedControl(Point p) {
- Glyph glyph = _glyphEdit.getGlyph();
- for (int i = 0; i < glyph.getPointCount(); i++) {
- net.java.dev.typecast.ot.Point gp = glyph.getPoint(i);
- double gpx = _glyphEdit.getScaleFactor() * (gp.x + _glyphEdit.getTranslateX());
- double gpy = _glyphEdit.getScaleFactor() * (-gp.y + _glyphEdit.getTranslateY());
- if (((gpx >= p.x - 2) && (gpx <= p.x + 2)) &&
- ((gpy >= p.y - 2) && (gpy <= p.y + 2))) {
- gp.onCurve = !gp.onCurve;
- }
- }
- _glyphEdit.modified();
- _glyphEdit.repaint();
- }
-
- /**
- * Moves the selected points
- */
- public void dragged(Point p) {
- int x = (int)(p.x / _glyphEdit.getScaleFactor() - _glyphEdit.getTranslateX());
- int y = -(int)(p.y / _glyphEdit.getScaleFactor() - _glyphEdit.getTranslateY());
- Iterator iter = _glyphEdit.getSelectedPoints().iterator();
- while (iter.hasNext()) {
- net.java.dev.typecast.ot.Point gp = (net.java.dev.typecast.ot.Point) iter.next();
- gp.x = x;
- gp.y = y;
- }
- _glyphEdit.modified();
- _glyphEdit.repaint();
- }
-
- /**
- * nop
- */
- public void released(Point p) {
- }
-}
diff --git a/src/net/java/dev/typecast/edit/SelectCommand.java b/src/net/java/dev/typecast/edit/SelectCommand.java
deleted file mode 100644
index c5a41bf..0000000
--- a/src/net/java/dev/typecast/edit/SelectCommand.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Typecast - The Font Development Environment
- *
- * Copyright (c) 2004 David Schweinsberg
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.java.dev.typecast.edit;
-
-
-
-/**
- *
- * @author <a href="mailto:[email protected]">David Schweinsberg</a>
- */
-public class SelectCommand extends Command {
-
- /** Creates new SelectCommand */
- public SelectCommand() {
- }
-
- void unexecute() {
- }
-
- void execute() {
- }
-
-}
diff --git a/src/net/java/dev/typecast/edit/Tool.java b/src/net/java/dev/typecast/edit/Tool.java
deleted file mode 100644
index 679a495..0000000
--- a/src/net/java/dev/typecast/edit/Tool.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Typecast - The Font Development Environment
- *
- * Copyright (c) 2004 David Schweinsberg
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.java.dev.typecast.edit;
-
-import java.awt.Point;
-import java.awt.Window;
-
-/**
- *
- * @author <a href="mailto:[email protected]">David Schweinsberg</a>
- */
-public abstract class Tool {
-
- public abstract void pressed(Point p);
-
- public abstract void pressedControl(Point p);
-
- public abstract void released(Point p);
-
- public abstract void dragged(Point p);
-}
diff --git a/src/test/net/java/dev/typecast/ot/FixedTest.java b/src/test/net/java/dev/typecast/ot/FixedTest.java
new file mode 100644
index 0000000..196a1d8
--- /dev/null
+++ b/src/test/net/java/dev/typecast/ot/FixedTest.java
@@ -0,0 +1,55 @@
+package net.java.dev.typecast.ot;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+public class FixedTest extends TestCase {
+ /**
+ * Create the test case
+ *
+ * @param testName name of the test case
+ */
+ public FixedTest(String testName) {
+ super(testName);
+ }
+
+ /**
+ * @return the suite of tests being tested
+ */
+ public static Test suite() {
+ return new TestSuite(FixedTest.class);
+ }
+
+ public void testSquareRoot() {
+ // Values are 26.6 fixed numbers
+ assertEquals(0x40, Fixed.squareRoot(0x40)); // 1.0
+ assertEquals(0x80, Fixed.squareRoot(0x100)); // 4.0
+ assertEquals(0xC0, Fixed.squareRoot(0x240)); // 9.0
+ assertEquals(0x100, Fixed.squareRoot(0x400)); // 16.0
+ assertEquals(0x80|0x20, Fixed.squareRoot(0x180|0x10)); // 6.25
+ }
+
+ public void testFloatValue() {
+ assertEquals(0.0f, Fixed.floatValue(0x00000));
+ assertEquals(0.5f, Fixed.floatValue(0x08000));
+ assertEquals(1.0f, Fixed.floatValue(0x10000));
+ assertEquals(1.25f, Fixed.floatValue(0x14000));
+ assertEquals(1.5f, Fixed.floatValue(0x18000));
+ assertEquals(1.75f, Fixed.floatValue(0x1c000));
+ assertEquals(2.125f, Fixed.floatValue(0x22000));
+ assertEquals(3.0625f, Fixed.floatValue(0x31000));
+ assertEquals(4.03125f, Fixed.floatValue(0x40800));
+ assertEquals(5.015625f, Fixed.floatValue(0x50400));
+ assertEquals(6.0078125f, Fixed.floatValue(0x60200));
+ assertEquals(7.00390625f, Fixed.floatValue(0x70100));
+ assertEquals(8.001953125f, Fixed.floatValue(0x80080));
+ assertEquals(9.0009765625f, Fixed.floatValue(0x90040));
+ assertEquals(10.00048828125f, Fixed.floatValue(0xa0020));
+ assertEquals(11.000244140625f, Fixed.floatValue(0xb0010));
+ assertEquals(12.0001220703125f, Fixed.floatValue(0xc0008));
+ assertEquals(13.00006103515625f, Fixed.floatValue(0xd0004));
+ assertEquals(14.00003051757813f, Fixed.floatValue(0xe0002));
+ assertEquals(15.00001525878907f, Fixed.floatValue(0xf0001));
+ }
+}
diff --git a/typecast.iml b/typecast.iml
deleted file mode 100644
index 611ca8c..0000000
--- a/typecast.iml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module type="JAVA_MODULE" version="4">
- <component name="NewModuleRootManager" inherit-compiler-output="true">
- <exclude-output />
- <content url="file://$MODULE_DIR$">
- <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
- </content>
- <orderEntry type="inheritedJdk" />
- <orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="library" name="ch.qos.logback:logback-classic:1.2.3" level="application" />
- <orderEntry type="library" name="jlfgr-1.0" level="application" />
- </component>
-</module> \ No newline at end of file