src/share/classes/sun/font/FreetypeFontScaler.java
Print this page
rev 1379 : [mq]: fontmanager.patch
@@ -77,22 +77,23 @@
if (nativeScaler != 0L) {
return getFontMetricsNative(font.get(),
pScalerContext,
nativeScaler);
}
- return FontManager.getNullScaler().getFontMetrics(0L);
+ return FontScaler.getNullScaler().getFontMetrics(0L);
}
synchronized float getGlyphAdvance(long pScalerContext, int glyphCode)
throws FontScalerException {
if (nativeScaler != 0L) {
return getGlyphAdvanceNative(font.get(),
pScalerContext,
nativeScaler,
glyphCode);
}
- return FontManager.getNullScaler().getGlyphAdvance(0L, glyphCode);
+ return FontScaler.getNullScaler().
+ getGlyphAdvance(0L, glyphCode);
}
synchronized void getGlyphMetrics(long pScalerContext,
int glyphCode, Point2D.Float metrics)
throws FontScalerException {
@@ -102,22 +103,24 @@
nativeScaler,
glyphCode,
metrics);
return;
}
- FontManager.getNullScaler().getGlyphMetrics(0L, glyphCode, metrics);
+ FontScaler.getNullScaler().
+ getGlyphMetrics(0L, glyphCode, metrics);
}
synchronized long getGlyphImage(long pScalerContext, int glyphCode)
throws FontScalerException {
if (nativeScaler != 0L) {
return getGlyphImageNative(font.get(),
pScalerContext,
nativeScaler,
glyphCode);
}
- return FontManager.getNullScaler().getGlyphImage(0L, glyphCode);
+ return FontScaler.getNullScaler().
+ getGlyphImage(0L, glyphCode);
}
synchronized Rectangle2D.Float getGlyphOutlineBounds(
long pScalerContext, int glyphCode)
throws FontScalerException {
@@ -125,11 +128,12 @@
return getGlyphOutlineBoundsNative(font.get(),
pScalerContext,
nativeScaler,
glyphCode);
}
- return FontManager.getNullScaler().getGlyphOutlineBounds(0L,glyphCode);
+ return FontScaler.getNullScaler().
+ getGlyphOutlineBounds(0L,glyphCode);
}
synchronized GeneralPath getGlyphOutline(
long pScalerContext, int glyphCode, float x, float y)
throws FontScalerException {
@@ -138,11 +142,12 @@
pScalerContext,
nativeScaler,
glyphCode,
x, y);
}
- return FontManager.getNullScaler().getGlyphOutline(0L, glyphCode, x,y);
+ return FontScaler.getNullScaler().
+ getGlyphOutline(0L, glyphCode, x,y);
}
synchronized GeneralPath getGlyphVectorOutline(
long pScalerContext, int[] glyphs, int numGlyphs,
float x, float y) throws FontScalerException {
@@ -152,12 +157,12 @@
nativeScaler,
glyphs,
numGlyphs,
x, y);
}
- return FontManager.getNullScaler().getGlyphVectorOutline(
- 0L, glyphs, numGlyphs, x, y);
+ return FontScaler
+ .getNullScaler().getGlyphVectorOutline(0L, glyphs, numGlyphs, x, y);
}
synchronized long getLayoutTableCache() throws FontScalerException {
return getLayoutTableCacheNative(nativeScaler);
}
@@ -171,35 +176,35 @@
synchronized int getNumGlyphs() throws FontScalerException {
if (nativeScaler != 0L) {
return getNumGlyphsNative(nativeScaler);
}
- return FontManager.getNullScaler().getNumGlyphs();
+ return FontScaler.getNullScaler().getNumGlyphs();
}
synchronized int getMissingGlyphCode() throws FontScalerException {
if (nativeScaler != 0L) {
return getMissingGlyphCodeNative(nativeScaler);
}
- return FontManager.getNullScaler().getMissingGlyphCode();
+ return FontScaler.getNullScaler().getMissingGlyphCode();
}
synchronized int getGlyphCode(char charCode) throws FontScalerException {
if (nativeScaler != 0L) {
return getGlyphCodeNative(nativeScaler, charCode);
}
- return FontManager.getNullScaler().getGlyphCode(charCode);
+ return FontScaler.getNullScaler().getGlyphCode(charCode);
}
synchronized Point2D.Float getGlyphPoint(long pScalerContext,
int glyphCode, int ptNumber)
throws FontScalerException {
if (nativeScaler != 0L) {
return getGlyphPointNative(font.get(), pScalerContext,
nativeScaler, glyphCode, ptNumber);
}
- return FontManager.getNullScaler().getGlyphPoint(
+ return FontScaler.getNullScaler().getGlyphPoint(
pScalerContext, glyphCode, ptNumber);
}
synchronized long getUnitsPerEm() {
return getUnitsPerEMNative(nativeScaler);