@@ -118,10 +118,10 @@ public class PFont implements PConstants {
118118 /**
119119 * True if this font should return 'null' for getFont(), so that the native
120120 * font will be used to create a subset, but the native version of the font
121- * will not be used.
121+ * will not be used.
122122 */
123- protected boolean subsetting ;
124-
123+ protected boolean subsetting ;
124+
125125 /**
126126 * True if we've already tried to find the native version of this font.
127127 */
@@ -133,18 +133,18 @@ public class PFont implements PConstants {
133133 * bug that they can't be bothered to fix.
134134 */
135135 static protected Typeface [] typefaces ;
136-
136+
137137 // objects to handle creation of font characters only as they're needed
138138 Bitmap lazyBitmap ;
139139 Canvas lazyCanvas ;
140140 Paint lazyPaint ;
141141// FontMetrics lazyMetrics;
142142 int [] lazySamples ;
143-
143+
144144 /** for subclasses that need to store metadata about the font */
145- protected HashMap <PGraphics , Object > cacheMap ;
146-
147-
145+ protected HashMap <PGraphics , Object > cacheMap ;
146+
147+
148148 public PFont () { } // for subclasses
149149
150150
@@ -212,7 +212,7 @@ public PFont(Typeface font, int size, boolean smooth, char charset[]) {
212212
213213 if (charset == null ) {
214214 lazy = true ;
215-
215+
216216 } else {
217217 // charset needs to be sorted to make index lookup run more quickly
218218 // http://dev.processing.org/bugs/show_bug.cgi?id=494
@@ -317,7 +317,7 @@ public PFont(InputStream input) throws IOException {
317317 }
318318 }
319319
320-
320+
321321 /**
322322 * Write this PFont to an OutputStream.
323323 * <p>
@@ -408,20 +408,20 @@ public String getName() {
408408 return name ;
409409 }
410410
411-
411+
412412 /**
413413 * Return size of this font.
414414 */
415415 public int getSize () {
416416 return size ;
417417 }
418-
418+
419419
420420 public void setSubsetting () {
421421 subsetting = true ;
422422 }
423423
424-
424+
425425 public String getPostScriptName () {
426426 return psname ;
427427 }
@@ -430,15 +430,15 @@ public String getPostScriptName() {
430430 /**
431431 * Set the native complement of this font.
432432 */
433- public void setTypeface ( Typeface typeface ) {
434- this .typeface = typeface ;
433+ public void setNative ( Object typeface ) {
434+ this .typeface = ( Typeface ) typeface ;
435435 }
436436
437437
438438 /**
439439 * Return the native Typeface object associated with this PFont (if any).
440440 */
441- public Typeface getTypeface () {
441+ public Typeface getNative () {
442442 if (subsetting ) {
443443 return null ;
444444 }
@@ -450,7 +450,7 @@ public Typeface getTypeface() {
450450 * Attempt to find the native version of this font.
451451 * (Public so that it can be used by OpenGL or other renderers.)
452452 */
453- static public Typeface findTypeface (String name ) {
453+ static public Object findNative (String name ) {
454454 loadTypefaces ();
455455 return typefaceMap .get (name );
456456 }
@@ -564,14 +564,14 @@ public float width(char c) {
564564 //////////////////////////////////////////////////////////////
565565
566566 // METADATA REQUIRED BY THE RENDERERS
567-
567+
568568
569569 /**
570570 * Store data of some kind for a renderer that requires extra metadata of
571571 * some kind. Usually this is a renderer-specific representation of the
572572 * font data, for instance a custom OpenGL texture for PGraphicsOpenGL2.
573573 * @param renderer The PGraphics renderer associated to the font
574- * @param storage The metadata required by the renderer
574+ * @param storage The metadata required by the renderer
575575 */
576576 public void setCache (PGraphics renderer , Object storage ) {
577577 if (cacheMap == null ) cacheMap = new HashMap <PGraphics , Object >();
@@ -601,22 +601,22 @@ public void removeCache(PGraphics renderer) {
601601 if (cacheMap != null ) {
602602 cacheMap .remove (renderer );
603603 }
604- }
605-
606-
607- //////////////////////////////////////////////////////////////
608-
604+ }
605+
606+
607+ //////////////////////////////////////////////////////////////
608+
609609 public int getGlyphCount () {
610610 return glyphCount ;
611611 }
612-
612+
613613 public Glyph getGlyph (int i ) {
614- return glyphs [i ];
615- }
616-
614+ return glyphs [i ];
615+ }
616+
617617 //////////////////////////////////////////////////////////////
618618
619-
619+
620620 static final char [] EXTRA_CHARS = {
621621 0x0080 , 0x0081 , 0x0082 , 0x0083 , 0x0084 , 0x0085 , 0x0086 , 0x0087 ,
622622 0x0088 , 0x0089 , 0x008A , 0x008B , 0x008C , 0x008D , 0x008E , 0x008F ,
@@ -725,7 +725,7 @@ static public void loadTypefaces() {
725725 }
726726 }
727727
728-
728+
729729 /////////////////////////////////////////////////////////////
730730
731731 /**
@@ -736,7 +736,7 @@ public class Glyph {
736736 public int value ;
737737 public int height ;
738738 public int width ;
739- public int index ;
739+ public int index ;
740740 public int setWidth ;
741741 public int topExtent ;
742742 public int leftExtent ;
0 commit comments