| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -63,7 +63,7 @@ public class PGraphicsPDF extends PGraphicsJava2D { | |||
| 63 | 63 | static protected String fontList[]; | |
| 64 | 64 | ||
| 65 | 65 | ||
| 66 | - public PGraphicsPDF() { | ||
| 66 | + public PGraphicsPDF() { | ||
| 67 | 67 | // PDF always likes native fonts. Always. | |
| 68 | 68 | hint(ENABLE_NATIVE_FONTS); | |
| 69 | 69 | } | |
@@ -105,8 +105,8 @@ protected void defaultSettings() { // ignore | |||
| 105 | 105 | super.defaultSettings(); | |
| 106 | 106 | textMode = SHAPE; | |
| 107 | 107 | } | |
| 108 | - | ||
| 109 | - | ||
| 108 | + | ||
| 109 | + | ||
| 110 | 110 | public void beginDraw() { | |
| 111 | 111 | // long t0 = System.currentTimeMillis(); | |
| 112 | 112 | ||
@@ -210,8 +210,8 @@ static protected DefaultFontMapper getMapper() { | |||
| 210 | 210 | } | |
| 211 | 211 | return mapper; | |
| 212 | 212 | } | |
| 213 | - | ||
| 214 | - | ||
| 213 | + | ||
| 214 | + | ||
| 215 | 215 | static protected void checkDir(String path, DefaultFontMapper mapper) { | |
| 216 | 216 | File folder = new File(path); | |
| 217 | 217 | if (folder.exists()) { | |
@@ -316,8 +316,8 @@ public void nextPage() { | |||
| 316 | 316 | beginDraw(); | |
| 317 | 317 | style(savedStyle); | |
| 318 | 318 | } | |
| 319 | - | ||
| 320 | - | ||
| 319 | + | ||
| 320 | + | ||
| 321 | 321 | protected Graphics2D createGraphics() { | |
| 322 | 322 | if (textMode == SHAPE) { | |
| 323 | 323 | return content.createGraphicsShapes(width, height); | |
@@ -604,7 +604,7 @@ public void addFonts(String directory) { | |||
| 604 | 604 | * @return true if it's ok | |
| 605 | 605 | */ | |
| 606 | 606 | protected void checkFont() { | |
| 607 | - Font awtFont = textFont.getNative(); | ||
| 607 | + Font awtFont = (Font) textFont.getNative(); | ||
| 608 | 608 | if (awtFont == null) { // always need a native font or reference to it | |
| 609 | 609 | throw new RuntimeException("Use createFont() instead of loadFont() " + | |
| 610 | 610 | "when drawing text using the PDF library."); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments