下面列出了怎么用sun.awt.PlatformFont的API类实例代码及写法,或者点击链接到github查看源代码。
protected int platformFontCount(Font font, String str) {
if (mFontProps == null) {
return 0;
}
CharsetString[] acs =
((PlatformFont)(font.getPeer())).makeMultiCharsetString(str,false);
if (acs == null) {
/* AWT can't convert all chars so use 2D path */
return 0;
}
int[] psFonts = getPSFontIndexArray(font, acs);
return (psFonts == null) ? 0 : psFonts.length;
}
protected int platformFontCount(Font font, String str) {
if (mFontProps == null) {
return 0;
}
CharsetString[] acs =
((PlatformFont)(font.getPeer())).makeMultiCharsetString(str,false);
if (acs == null) {
/* AWT can't convert all chars so use 2D path */
return 0;
}
int[] psFonts = getPSFontIndexArray(font, acs);
return (psFonts == null) ? 0 : psFonts.length;
}
protected int platformFontCount(Font font, String str) {
if (mFontProps == null) {
return 0;
}
CharsetString[] acs =
((PlatformFont)(font.getPeer())).makeMultiCharsetString(str,false);
if (acs == null) {
/* AWT can't convert all chars so use 2D path */
return 0;
}
int[] psFonts = getPSFontIndexArray(font, acs);
return (psFonts == null) ? 0 : psFonts.length;
}
protected int platformFontCount(Font font, String str) {
if (mFontProps == null) {
return 0;
}
CharsetString[] acs =
((PlatformFont)(font.getPeer())).makeMultiCharsetString(str,false);
if (acs == null) {
/* AWT can't convert all chars so use 2D path */
return 0;
}
int[] psFonts = getPSFontIndexArray(font, acs);
return (psFonts == null) ? 0 : psFonts.length;
}
protected int platformFontCount(Font font, String str) {
if (mFontProps == null) {
return 0;
}
CharsetString[] acs =
((PlatformFont)(font.getPeer())).makeMultiCharsetString(str,false);
if (acs == null) {
/* AWT can't convert all chars so use 2D path */
return 0;
}
int[] psFonts = getPSFontIndexArray(font, acs);
return (psFonts == null) ? 0 : psFonts.length;
}
protected int platformFontCount(Font font, String str) {
if (mFontProps == null) {
return 0;
}
PlatformFont peer = (PlatformFont) FontAccess.getFontAccess()
.getFontPeer(font);
CharsetString[] acs = peer.makeMultiCharsetString(str, false);
if (acs == null) {
/* AWT can't convert all chars so use 2D path */
return 0;
}
int[] psFonts = getPSFontIndexArray(font, acs);
return (psFonts == null) ? 0 : psFonts.length;
}
protected int platformFontCount(Font font, String str) {
if (mFontProps == null) {
return 0;
}
PlatformFont peer = (PlatformFont) FontAccess.getFontAccess()
.getFontPeer(font);
CharsetString[] acs = peer.makeMultiCharsetString(str, false);
if (acs == null) {
/* AWT can't convert all chars so use 2D path */
return 0;
}
int[] psFonts = getPSFontIndexArray(font, acs);
return (psFonts == null) ? 0 : psFonts.length;
}
protected int platformFontCount(Font font, String str) {
if (mFontProps == null) {
return 0;
}
CharsetString[] acs =
((PlatformFont)(font.getPeer())).makeMultiCharsetString(str,false);
if (acs == null) {
/* AWT can't convert all chars so use 2D path */
return 0;
}
int[] psFonts = getPSFontIndexArray(font, acs);
return (psFonts == null) ? 0 : psFonts.length;
}
protected int platformFontCount(Font font, String str) {
if (mFontProps == null) {
return 0;
}
CharsetString[] acs =
((PlatformFont)(font.getPeer())).makeMultiCharsetString(str,false);
if (acs == null) {
/* AWT can't convert all chars so use 2D path */
return 0;
}
int[] psFonts = getPSFontIndexArray(font, acs);
return (psFonts == null) ? 0 : psFonts.length;
}
protected int platformFontCount(Font font, String str) {
if (mFontProps == null) {
return 0;
}
CharsetString[] acs =
((PlatformFont)(font.getPeer())).makeMultiCharsetString(str,false);
if (acs == null) {
/* AWT can't convert all chars so use 2D path */
return 0;
}
int[] psFonts = getPSFontIndexArray(font, acs);
return (psFonts == null) ? 0 : psFonts.length;
}
protected int platformFontCount(Font font, String str) {
if (mFontProps == null) {
return 0;
}
CharsetString[] acs =
((PlatformFont)(font.getPeer())).makeMultiCharsetString(str,false);
if (acs == null) {
/* AWT can't convert all chars so use 2D path */
return 0;
}
int[] psFonts = getPSFontIndexArray(font, acs);
return (psFonts == null) ? 0 : psFonts.length;
}
protected int platformFontCount(Font font, String str) {
if (mFontProps == null) {
return 0;
}
CharsetString[] acs =
((PlatformFont)(font.getPeer())).makeMultiCharsetString(str,false);
if (acs == null) {
/* AWT can't convert all chars so use 2D path */
return 0;
}
int[] psFonts = getPSFontIndexArray(font, acs);
return (psFonts == null) ? 0 : psFonts.length;
}
protected int platformFontCount(Font font, String str) {
if (mFontProps == null) {
return 0;
}
CharsetString[] acs =
((PlatformFont)(font.getPeer())).makeMultiCharsetString(str,false);
if (acs == null) {
/* AWT can't convert all chars so use 2D path */
return 0;
}
int[] psFonts = getPSFontIndexArray(font, acs);
return (psFonts == null) ? 0 : psFonts.length;
}
protected int platformFontCount(Font font, String str) {
if (mFontProps == null) {
return 0;
}
CharsetString[] acs =
((PlatformFont)(font.getPeer())).makeMultiCharsetString(str,false);
if (acs == null) {
/* AWT can't convert all chars so use 2D path */
return 0;
}
int[] psFonts = getPSFontIndexArray(font, acs);
return (psFonts == null) ? 0 : psFonts.length;
}