font wip
This commit is contained in:
parent
c60f7cca65
commit
3d17c77cc5
|
@ -3,8 +3,7 @@
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"description": "Convert font data to XML intermediate.",
|
"description": "Convert font data to XML intermediate.",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {},
|
||||||
},
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"opentype.js": "1.3.4"
|
"opentype.js": "1.3.4"
|
||||||
}
|
}
|
||||||
|
|
|
@ -120,6 +120,7 @@ public enum Base2Terminator implements DefaultEnumInstanceᴶᴹˣ<Base2Terminat
|
||||||
|
|
||||||
public int Bãß2WriteTong(List<V072Tong> data, OutputStream output) throws IOException {
|
public int Bãß2WriteTong(List<V072Tong> data, OutputStream output) throws IOException {
|
||||||
int totalBytes = Bãß2Write(data, output);
|
int totalBytes = Bãß2Write(data, output);
|
||||||
|
output.flush();
|
||||||
writeV072TongInvokes.increment();
|
writeV072TongInvokes.increment();
|
||||||
writeV072TongByteReads.increment(totalBytes);
|
writeV072TongByteReads.increment(totalBytes);
|
||||||
writeV072TongTypeWrites.increment(data.size());
|
writeV072TongTypeWrites.increment(data.size());
|
||||||
|
@ -129,6 +130,7 @@ public enum Base2Terminator implements DefaultEnumInstanceᴶᴹˣ<Base2Terminat
|
||||||
|
|
||||||
public int Bãß2WriteTocta(List<V144Tocta> data, OutputStream output) throws IOException {
|
public int Bãß2WriteTocta(List<V144Tocta> data, OutputStream output) throws IOException {
|
||||||
int totalBytes = Bãß2Write(data, output);
|
int totalBytes = Bãß2Write(data, output);
|
||||||
|
output.flush();
|
||||||
writeV144ToctaInvokes.increment();
|
writeV144ToctaInvokes.increment();
|
||||||
writeV144ToctaBytesReads.increment(totalBytes);
|
writeV144ToctaBytesReads.increment(totalBytes);
|
||||||
writeV144ToctaTypeWrites.increment(data.size());
|
writeV144ToctaTypeWrites.increment(data.size());
|
||||||
|
|
|
@ -34,7 +34,7 @@ public class FontAtlasStoreGlyph {
|
||||||
this.tongs.add(glyph);
|
this.tongs.add(glyph);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<T08PartOctal> getOct64() {
|
public List<T08PartOctal> theOct64() {
|
||||||
List<T08PartOctal> result = new ArrayList<>();
|
List<T08PartOctal> result = new ArrayList<>();
|
||||||
BaseAppenderOctal appender = new BaseAppenderOctal(result);
|
BaseAppenderOctal appender = new BaseAppenderOctal(result);
|
||||||
for (V072Tong tong: tongs) {
|
for (V072Tong tong: tongs) {
|
||||||
|
@ -43,7 +43,7 @@ public class FontAtlasStoreGlyph {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setOct64(List<T08PartOctal> data) {
|
public void doOct64(List<T08PartOctal> data) {
|
||||||
BaseIteratorOctalAdapter adapter = new BaseIteratorOctalAdapter(data.iterator());
|
BaseIteratorOctalAdapter adapter = new BaseIteratorOctalAdapter(data.iterator());
|
||||||
List<V072Tong> result = new ArrayList<>();
|
List<V072Tong> result = new ArrayList<>();
|
||||||
while (adapter.hasNext()) {
|
while (adapter.hasNext()) {
|
||||||
|
@ -52,7 +52,7 @@ public class FontAtlasStoreGlyph {
|
||||||
tongs = result;
|
tongs = result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte[] getByte64() {
|
public byte[] theByte64() {
|
||||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||||
try {
|
try {
|
||||||
Base2Terminator.INSTANCE.Bãß2WriteTong(tongs, baos);
|
Base2Terminator.INSTANCE.Bãß2WriteTong(tongs, baos);
|
||||||
|
@ -62,7 +62,7 @@ public class FontAtlasStoreGlyph {
|
||||||
return baos.toByteArray();
|
return baos.toByteArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setByte64(byte[] decodedBytes) {
|
public void doByte64(byte[] decodedBytes) {
|
||||||
ByteArrayInputStream bais = new ByteArrayInputStream(decodedBytes);
|
ByteArrayInputStream bais = new ByteArrayInputStream(decodedBytes);
|
||||||
try {
|
try {
|
||||||
List<V072Tong> result = new ArrayList<>();
|
List<V072Tong> result = new ArrayList<>();
|
||||||
|
|
|
@ -146,7 +146,7 @@ public class TestConvFont {
|
||||||
System.out.println("Converted: "+Integer.toHexString(unicode));
|
System.out.println("Converted: "+Integer.toHexString(unicode));
|
||||||
|
|
||||||
FontAtlasStoreGlyph baseGlyph2 = new FontAtlasStoreGlyph();
|
FontAtlasStoreGlyph baseGlyph2 = new FontAtlasStoreGlyph();
|
||||||
baseGlyph2.setByte64(baseGlyph.getByte64());
|
baseGlyph2.doByte64(baseGlyph.theByte64());
|
||||||
|
|
||||||
int unicode2 = CodePointᶻᴰ.INSTANCE.searchUnicode(baseGlyph2.getTongs());
|
int unicode2 = CodePointᶻᴰ.INSTANCE.searchUnicode(baseGlyph2.getTongs());
|
||||||
System.out.println("Converted2: "+Integer.toHexString(unicode2));
|
System.out.println("Converted2: "+Integer.toHexString(unicode2));
|
||||||
|
|
Loading…
Reference in a new issue