blob: f6ac2ce76f97dc519d34729cebf1c6a1631084bd (
plain)
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
|
package com.artifex.mupdf.fitz;
public class Font
{
static {
Context.init();
}
public static final int LATIN = 0;
public static final int GREEK = 1;
public static final int CYRILLIC = 2;
public static final int CN = 0;
public static final int TW = 1;
public static final int JP = 2;
public static final int KR = 3;
private long pointer;
protected native void finalize();
public void destroy() {
finalize();
pointer = 0;
}
private native long newNative(String name, int index);
private Font(long p) {
pointer = p;
}
public Font(String name, int index) {
pointer = newNative(name, index);
}
public Font(String name) {
pointer = newNative(name, 0);
}
public native String getName();
public native int encodeCharacter(int unicode);
public native float advanceGlyph(int glyph, boolean wmode);
public float advanceGlyph(int glyph) {
return advanceGlyph(glyph, false);
}
public String toString() {
return "Font(" + getName() + ")";
}
}
|