MCPcopy Create free account
hub / github.com/XCSoar/XCSoar / TextUtil

Method TextUtil

android/src/TextUtil.java:42–56  ·  view source on GitHub ↗
(int style, int textSize,
                  int paint_flags, boolean monospace)

Source from the content-addressed store, hash-verified

40 private final int[] id = new int[5];
41
42 public TextUtil(int style, int textSize,
43 int paint_flags, boolean monospace) {
44 Typeface tf = Typeface.create(monospace
45 ? Typeface.MONOSPACE
46 : Typeface.DEFAULT,
47 style);
48
49 paint = new Paint(paint_flags);
50 paint.setTypeface(tf);
51 paint.setTextSize(textSize);
52 if ((style & Typeface.ITALIC) != 0 && !tf.isItalic())
53 paint.setTextSkewX((float) -0.2);
54
55 metrics = paint.getFontMetricsInt();
56 }
57
58 public void getFontMetrics(int[] metrics) {
59 Rect bounds = new Rect();

Callers

nothing calls this directly

Calls 1

createMethod · 0.45

Tested by

no test coverage detected