Font.java
2.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* org.slf4j.Logger
* org.slf4j.LoggerFactory
*/
package com.day.image;
import com.day.image.Layer;
import com.day.image.font.AbstractFont;
import com.day.image.font.FontListEntry;
import com.day.image.internal.font.FontHelper;
import java.awt.Paint;
import java.awt.Stroke;
import java.awt.geom.Rectangle2D;
import java.text.CharacterIterator;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/*
* This class specifies class file version 49.0 but uses Java 6 signatures. Assumed Java 6.
*/
public final class Font
extends AbstractFont {
private final Logger log;
private final AbstractFont delegatee;
public static List<FontListEntry> getFontList() {
return FontHelper.getInstance().getFontList();
}
public Font(String faceName, int size, int style) {
this.log = LoggerFactory.getLogger(this.getClass());
this.log.debug("Font: Looking for {}/{}/{}", new Object[]{faceName, size, Font.styleToDescription(style)});
this.delegatee = FontHelper.getInstance().getFont(faceName, size, style);
this.log.debug("Font: Using font {}", (Object)this.delegatee);
}
public Font(String faceName, int size) {
this(faceName, size, 0);
}
@Override
public Rectangle2D getTextExtent(int x, int y, int width, int height, String text, int align, double cs, int ls) {
return this.delegatee.getTextExtent(x, y, width, height, text, align, cs, ls);
}
@Override
public int drawText(Layer layer, int x, int y, int width, int height, String text, Paint paint, Stroke stroke, int align, double cs, int ls) {
return this.delegatee.drawText(layer, x, y, width, height, text, paint, stroke, align, cs, ls);
}
@Override
public double getHeight() {
return this.delegatee.getHeight();
}
@Override
public double getAscent() {
return this.delegatee.getAscent();
}
@Override
public double getDescent() {
return this.delegatee.getDescent();
}
@Override
public boolean canDisplay(char c) {
return this.delegatee.canDisplay(c);
}
@Override
public int canDisplayUpTo(CharacterIterator iter, int start, int limit) {
return this.delegatee.canDisplayUpTo(iter, start, limit);
}
@Override
public int canDisplayUpTo(String str) {
return this.delegatee.canDisplayUpTo(str);
}
@Override
public int canDisplayUpTo(char[] text, int start, int limit) {
return this.delegatee.canDisplayUpTo(text, start, limit);
}
@Override
public String toString() {
return this.delegatee.toString();
}
@Override
public java.awt.Font getAwtFont() {
return this.delegatee.getAwtFont();
}
}