mirror of
https://github.com/processing/processing4.git
synced 2026-02-10 17:19:25 +01:00
clean up some font handling
This commit is contained in:
@@ -23,10 +23,6 @@
|
||||
|
||||
package processing.opengl;
|
||||
|
||||
import processing.core.PApplet;
|
||||
import processing.core.PGraphics;
|
||||
|
||||
import java.awt.Font;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.nio.Buffer;
|
||||
@@ -37,6 +33,10 @@ import java.nio.IntBuffer;
|
||||
import java.nio.ShortBuffer;
|
||||
import java.util.Arrays;
|
||||
|
||||
import processing.core.PApplet;
|
||||
import processing.core.PGraphics;
|
||||
|
||||
|
||||
/**
|
||||
* Processing-OpenGL abstraction layer. Needs to be implemented by subclasses
|
||||
* using specific OpenGL-Java bindings.
|
||||
@@ -2105,25 +2105,18 @@ public abstract class PGL {
|
||||
|
||||
|
||||
// TODO: the next three functions shouldn't be here...
|
||||
// Uses 'Object' so that the API can be used w/ Android Typeface objects
|
||||
|
||||
protected int getFontAscent(Font font) {
|
||||
return 0;
|
||||
}
|
||||
abstract protected int getFontAscent(Object font);
|
||||
|
||||
|
||||
protected int getFontDescent(Font font) {
|
||||
return 0;
|
||||
}
|
||||
abstract protected int getFontDescent(Object font);
|
||||
|
||||
|
||||
protected int getTextWidth(Font font, char buffer[], int start, int stop) {
|
||||
return 0;
|
||||
}
|
||||
abstract protected int getTextWidth(Object font, char[] buffer, int start, int stop);
|
||||
|
||||
|
||||
protected Font getDerivedFont(Font font, float size) {
|
||||
return null;
|
||||
}
|
||||
abstract protected Object getDerivedFont(Object font, float size);
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user