diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2018-03-15 11:55:06 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2018-03-16 14:51:41 +0100 |
commit | 1cd2046b3cce264a3d13481652868fd1c31537fc (patch) | |
tree | 8ba181113cc22f2ffe4ba1a3ed549926b747bc8c /platform/java/src/com | |
parent | 2612c20b725319833caeef36ccf4240f34e0e24b (diff) | |
download | mupdf-1cd2046b3cce264a3d13481652868fd1c31537fc.tar.xz |
Add simple fonts with 8-bit greek and cyrillic encodings.
Use KOI8-U for Cyrillic, and ISO 8859-7 for Greek.
Use with 'mutool create' using an extra argument to the %%Font directive:
%%Font TmRmC Times-Roman Cyrillic
BT
/TmRmC 16 Tf 10 10 Td
<fa c4 d2 c1 d7 d3 d4 d7 d5 ca d4 c5 21> Tj
ET
The alternatives are "Latin", "Greek", and "Cyrillic".
Diffstat (limited to 'platform/java/src/com')
-rw-r--r-- | platform/java/src/com/artifex/mupdf/fitz/Font.java | 4 | ||||
-rw-r--r-- | platform/java/src/com/artifex/mupdf/fitz/PDFDocument.java | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/platform/java/src/com/artifex/mupdf/fitz/Font.java b/platform/java/src/com/artifex/mupdf/fitz/Font.java index 2910d543..f6ac2ce7 100644 --- a/platform/java/src/com/artifex/mupdf/fitz/Font.java +++ b/platform/java/src/com/artifex/mupdf/fitz/Font.java @@ -6,6 +6,10 @@ public class Font 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; diff --git a/platform/java/src/com/artifex/mupdf/fitz/PDFDocument.java b/platform/java/src/com/artifex/mupdf/fitz/PDFDocument.java index b650df52..211b6ab1 100644 --- a/platform/java/src/com/artifex/mupdf/fitz/PDFDocument.java +++ b/platform/java/src/com/artifex/mupdf/fitz/PDFDocument.java @@ -96,7 +96,7 @@ public class PDFDocument extends Document public native void insertPage(int at, PDFObject page); public native void deletePage(int at); public native PDFObject addImage(Image image); - public native PDFObject addSimpleFont(Font font); + public native PDFObject addSimpleFont(Font font, int encoding); public native PDFObject addCJKFont(Font font, int ordering); public native PDFObject addFont(Font font); public native boolean hasUnsavedChanges(); |