layout... WIP

This commit is contained in:
Jindra Petřík
2016-11-25 17:05:18 +01:00
parent a5b188ea36
commit 7046628b41
3 changed files with 38 additions and 5 deletions

View File

@@ -67,4 +67,33 @@ public class IggyCharOffset implements StructureInterface {
public void writeToDataStream(AbstractDataStream stream) throws IOException {
throw new UnsupportedOperationException("Not supported yet.");
}
public long getZero() {
return zero;
}
public int getIschar1() {
return ischar1;
}
public int getIschar2() {
return ischar2;
}
public long getZero2() {
return zero2;
}
public int getXscale() {
return xscale;
}
public int getYscale() {
return yscale;
}
public long getZero3() {
return zero3;
}
}

View File

@@ -314,4 +314,8 @@ public class IggyFont implements StructureInterface {
return what_3;
}
public List<IggyCharOffset> getCharOffsets() {
return charOffsets;
}
}

View File

@@ -112,15 +112,15 @@ public class IggyToSwfConvertor {
System.out.println("what_2: " + iggyFont.getWhat_2());
System.out.println("what_3: " + iggyFont.getWhat_3());
/*List<IggyCharOffset> offsets = iggyFont.getc();
fontTag.fontFlagsHasLayout = true;
List<IggyCharOffset> offsets = iggyFont.getCharOffsets();
fontTag.fontAdvanceTable = new ArrayList<>();
for (int i = 0; i < offsets.size(); i++) {
fontTag.fontAdvanceTable.add((int) offsets.get(i).getOffset());
}*/
//FIXME
fontTag.fontAdvanceTable.add((int) offsets.get(i).getXscale());
}
fontTag.fontKerningTable = new ArrayList<>();
IggyCharKerning ker = iggyFont.getCharKernings();
if (ker != null) {
fontTag.fontKerningTable = new ArrayList<>();
for (int i = 0; i < ker.getKernCount(); i++) {
int kerningCode1 = ker.getCharsA().get(i);
int kerningCode2 = ker.getCharsA().get(i);