diff options
author | fred ross-perry <fredross-perry@Fred-Ross-Perrys-Computer.local> | 2016-07-14 16:05:15 -0700 |
---|---|---|
committer | fred ross-perry <fred.ross-perry@artifex.com> | 2016-07-15 09:36:56 -0700 |
commit | cb78b5c6782f14a699f90bd5621cd3656a1e02ea (patch) | |
tree | 47b83072ff5fb133f8d4ac9ff32992e464234f86 /platform/java/src/com/artifex/mupdf/fitz/Font.java | |
parent | e47769cf2bc9feb30c074c965883f9662540ab3b (diff) | |
download | mupdf-cb78b5c6782f14a699f90bd5621cd3656a1e02ea.tar.xz |
java - move fitz sources into a 'src' subfolder.
Diffstat (limited to 'platform/java/src/com/artifex/mupdf/fitz/Font.java')
-rw-r--r-- | platform/java/src/com/artifex/mupdf/fitz/Font.java | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/platform/java/src/com/artifex/mupdf/fitz/Font.java b/platform/java/src/com/artifex/mupdf/fitz/Font.java new file mode 100644 index 00000000..5101a6ac --- /dev/null +++ b/platform/java/src/com/artifex/mupdf/fitz/Font.java @@ -0,0 +1,40 @@ +package com.artifex.mupdf.fitz; + +public class Font +{ + 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() + ")"; + } +} |