下面列出了java.awt.Font#LAYOUT_LEFT_TO_RIGHT 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
public void init(TestEnvironment env, Result results) {
super.init(env, results);
int flags = Font.LAYOUT_LEFT_TO_RIGHT;
if (Bidi.requiresBidi(chars, 0, chars.length)) { // assume rtl
flags = Font.LAYOUT_RIGHT_TO_LEFT;
}
gv = font.layoutGlyphVector(frc, chars, 0, chars.length, flags);
// gv options
}
public void init(TestEnvironment env, Result results) {
super.init(env, results);
chars1 = new char[chars.length + 2];
System.arraycopy(chars, 0, chars1, 1, chars.length);
ci = new ArrayCI(chars1, 1, chars.length);
gv = font.createGlyphVector(frc, text);
glyphs = gv.getGlyphCodes(0, gv.getNumGlyphs(), null);
flags = Bidi.requiresBidi(chars, 0, chars.length)
? Font.LAYOUT_LEFT_TO_RIGHT
: Font.LAYOUT_RIGHT_TO_LEFT;
}
public void init(TestEnvironment env, Result results) {
super.init(env, results);
int flags = Font.LAYOUT_LEFT_TO_RIGHT;
if (Bidi.requiresBidi(chars, 0, chars.length)) { // assume rtl
flags = Font.LAYOUT_RIGHT_TO_LEFT;
}
gv = font.layoutGlyphVector(frc, chars, 0, chars.length, flags);
// gv options
}
public void init(TestEnvironment env, Result results) {
super.init(env, results);
chars1 = new char[chars.length + 2];
System.arraycopy(chars, 0, chars1, 1, chars.length);
ci = new ArrayCI(chars1, 1, chars.length);
gv = font.createGlyphVector(frc, text);
glyphs = gv.getGlyphCodes(0, gv.getNumGlyphs(), null);
flags = Bidi.requiresBidi(chars, 0, chars.length)
? Font.LAYOUT_LEFT_TO_RIGHT
: Font.LAYOUT_RIGHT_TO_LEFT;
}
public void init(TestEnvironment env, Result results) {
super.init(env, results);
chars1 = new char[chars.length + 2];
System.arraycopy(chars, 0, chars1, 1, chars.length);
ci = new ArrayCI(chars1, 1, chars.length);
gv = font.createGlyphVector(frc, text);
glyphs = gv.getGlyphCodes(0, gv.getNumGlyphs(), null);
flags = Bidi.requiresBidi(chars, 0, chars.length)
? Font.LAYOUT_LEFT_TO_RIGHT
: Font.LAYOUT_RIGHT_TO_LEFT;
}
public void init(TestEnvironment env, Result results) {
super.init(env, results);
chars1 = new char[chars.length + 2];
System.arraycopy(chars, 0, chars1, 1, chars.length);
ci = new ArrayCI(chars1, 1, chars.length);
gv = font.createGlyphVector(frc, text);
glyphs = gv.getGlyphCodes(0, gv.getNumGlyphs(), null);
flags = Bidi.requiresBidi(chars, 0, chars.length)
? Font.LAYOUT_LEFT_TO_RIGHT
: Font.LAYOUT_RIGHT_TO_LEFT;
}
public void init(TestEnvironment env, Result results) {
super.init(env, results);
int flags = Font.LAYOUT_LEFT_TO_RIGHT;
if (Bidi.requiresBidi(chars, 0, chars.length)) { // assume rtl
flags = Font.LAYOUT_RIGHT_TO_LEFT;
}
gv = font.layoutGlyphVector(frc, chars, 0, chars.length, flags);
// gv options
}
public void init(TestEnvironment env, Result results) {
super.init(env, results);
chars1 = new char[chars.length + 2];
System.arraycopy(chars, 0, chars1, 1, chars.length);
ci = new ArrayCI(chars1, 1, chars.length);
gv = font.createGlyphVector(frc, text);
glyphs = gv.getGlyphCodes(0, gv.getNumGlyphs(), null);
flags = Bidi.requiresBidi(chars, 0, chars.length)
? Font.LAYOUT_LEFT_TO_RIGHT
: Font.LAYOUT_RIGHT_TO_LEFT;
}
public void init(TestEnvironment env, Result results) {
super.init(env, results);
int flags = Font.LAYOUT_LEFT_TO_RIGHT;
if (Bidi.requiresBidi(chars, 0, chars.length)) { // assume rtl
flags = Font.LAYOUT_RIGHT_TO_LEFT;
}
gv = font.layoutGlyphVector(frc, chars, 0, chars.length, flags);
// gv options
}
public void init(TestEnvironment env, Result results) {
super.init(env, results);
chars1 = new char[chars.length + 2];
System.arraycopy(chars, 0, chars1, 1, chars.length);
ci = new ArrayCI(chars1, 1, chars.length);
gv = font.createGlyphVector(frc, text);
glyphs = gv.getGlyphCodes(0, gv.getNumGlyphs(), null);
flags = Bidi.requiresBidi(chars, 0, chars.length)
? Font.LAYOUT_LEFT_TO_RIGHT
: Font.LAYOUT_RIGHT_TO_LEFT;
}
public void init(TestEnvironment env, Result results) {
super.init(env, results);
chars1 = new char[chars.length + 2];
System.arraycopy(chars, 0, chars1, 1, chars.length);
ci = new ArrayCI(chars1, 1, chars.length);
gv = font.createGlyphVector(frc, text);
glyphs = gv.getGlyphCodes(0, gv.getNumGlyphs(), null);
flags = Bidi.requiresBidi(chars, 0, chars.length)
? Font.LAYOUT_LEFT_TO_RIGHT
: Font.LAYOUT_RIGHT_TO_LEFT;
}
public void init(TestEnvironment env, Result results) {
super.init(env, results);
chars1 = new char[chars.length + 2];
System.arraycopy(chars, 0, chars1, 1, chars.length);
ci = new ArrayCI(chars1, 1, chars.length);
gv = font.createGlyphVector(frc, text);
glyphs = gv.getGlyphCodes(0, gv.getNumGlyphs(), null);
flags = Bidi.requiresBidi(chars, 0, chars.length)
? Font.LAYOUT_LEFT_TO_RIGHT
: Font.LAYOUT_RIGHT_TO_LEFT;
}
public void init(TestEnvironment env, Result results) {
super.init(env, results);
int flags = Font.LAYOUT_LEFT_TO_RIGHT;
if (Bidi.requiresBidi(chars, 0, chars.length)) { // assume rtl
flags = Font.LAYOUT_RIGHT_TO_LEFT;
}
gv = font.layoutGlyphVector(frc, chars, 0, chars.length, flags);
// gv options
}
public void init(TestEnvironment env, Result results) {
super.init(env, results);
chars1 = new char[chars.length + 2];
System.arraycopy(chars, 0, chars1, 1, chars.length);
ci = new ArrayCI(chars1, 1, chars.length);
gv = font.createGlyphVector(frc, text);
glyphs = gv.getGlyphCodes(0, gv.getNumGlyphs(), null);
flags = Bidi.requiresBidi(chars, 0, chars.length)
? Font.LAYOUT_LEFT_TO_RIGHT
: Font.LAYOUT_RIGHT_TO_LEFT;
}
public void init(TestEnvironment env, Result results) {
super.init(env, results);
int flags = Font.LAYOUT_LEFT_TO_RIGHT;
if (Bidi.requiresBidi(chars, 0, chars.length)) { // assume rtl
flags = Font.LAYOUT_RIGHT_TO_LEFT;
}
gv = font.layoutGlyphVector(frc, chars, 0, chars.length, flags);
// gv options
}
public void init(TestEnvironment env, Result results) {
super.init(env, results);
chars1 = new char[chars.length + 2];
System.arraycopy(chars, 0, chars1, 1, chars.length);
ci = new ArrayCI(chars1, 1, chars.length);
gv = font.createGlyphVector(frc, text);
glyphs = gv.getGlyphCodes(0, gv.getNumGlyphs(), null);
flags = Bidi.requiresBidi(chars, 0, chars.length)
? Font.LAYOUT_LEFT_TO_RIGHT
: Font.LAYOUT_RIGHT_TO_LEFT;
}
public void init(TestEnvironment env, Result results) {
super.init(env, results);
int flags = Font.LAYOUT_LEFT_TO_RIGHT;
if (Bidi.requiresBidi(chars, 0, chars.length)) { // assume rtl
flags = Font.LAYOUT_RIGHT_TO_LEFT;
}
gv = font.layoutGlyphVector(frc, chars, 0, chars.length, flags);
// gv options
}
public void init(TestEnvironment env, Result results) {
super.init(env, results);
int flags = Font.LAYOUT_LEFT_TO_RIGHT;
if (Bidi.requiresBidi(chars, 0, chars.length)) { // assume rtl
flags = Font.LAYOUT_RIGHT_TO_LEFT;
}
gv = font.layoutGlyphVector(frc, chars, 0, chars.length, flags);
// gv options
}
public void init(TestEnvironment env, Result results) {
super.init(env, results);
int flags = Font.LAYOUT_LEFT_TO_RIGHT;
if (Bidi.requiresBidi(chars, 0, chars.length)) { // assume rtl
flags = Font.LAYOUT_RIGHT_TO_LEFT;
}
gv = font.layoutGlyphVector(frc, chars, 0, chars.length, flags);
// gv options
}
/**
* The corresponding Font layout direction to this run direction.
*
* @return One of Font.LAYOUT_LEFT_TO_RIGHT or Font.LAYOUT_RIGHT_TO_LEFT.
*/
int getFontLayoutDirection() {
return direction.equals(TextAttribute.RUN_DIRECTION_LTR)
? Font.LAYOUT_LEFT_TO_RIGHT
: Font.LAYOUT_RIGHT_TO_LEFT;
}