Hi,
über
lasse ich mir eine Schrift "zerfallen".
Soweit so gut.
Gibt es eine Möglichkeit die TrueType Font zu Tracen, damit ich eine Single-Line-Font erhalte?
Ich habe mir zum Test auch eine Single-Line-Font aus dem Netz CamBam Stick Fonts gezogen, nur leider bekomme ich trotzdem eine "Outline" (siehe roten Kreis im Bild)
Hat jemand eine Idee ???:L
Gruß
über
Java:
FontRenderContext frc = g.getFontRenderContext();
Font myFont = new Font("Helvetica", 1, 120);
GlyphVector gv = myFont.createGlyphVector(frc, "Hello World");
Shape outline = gv.getOutline();
PathIterator iterator = outline.getPathIterator(null);
// Koordinanten ausgeben
while (!iterator.isDone()) {
double[] coordinates = new double[6];
int segType = iterator.currentSegment(coordinates);
switch (segType) {
case PathIterator.SEG_MOVETO:
System.out.println("move to " + coordinates[0] + ", " + coordinates[1] + "\n");
break;
case PathIterator.SEG_LINETO:
System.out.println("line to " + coordinates[0] + ", " + coordinates[1] + "\n");
break;
case PathIterator.SEG_QUADTO:
System.out.println("quadratic to " + coordinates[0] + ", " + coordinates[1]
+ ", " + coordinates[2] + ", " + coordinates[3] + "\n");
break;
case PathIterator.SEG_CUBICTO:
System.out.println("cubic to " + coordinates[0] + ", " + coordinates[1] + ", "
+ coordinates[2] + ", " + coordinates[3] + ", "
+ coordinates[4] + ", " + coordinates[5] + "\n");
break;
case PathIterator.SEG_CLOSE:
System.out.println("close" + "\n");
break;
default:
break;
}
iterator.next();
}
lasse ich mir eine Schrift "zerfallen".
Soweit so gut.
Gibt es eine Möglichkeit die TrueType Font zu Tracen, damit ich eine Single-Line-Font erhalte?
Ich habe mir zum Test auch eine Single-Line-Font aus dem Netz CamBam Stick Fonts gezogen, nur leider bekomme ich trotzdem eine "Outline" (siehe roten Kreis im Bild)
Hat jemand eine Idee ???:L
Gruß