Common interface for all FontBox fonts. @author John Hewson
| 28 | * @author John Hewson |
| 29 | */ |
| 30 | public interface FontBoxFont |
| 31 | { |
| 32 | /** |
| 33 | * The PostScript name of the font. |
| 34 | * |
| 35 | * @return the postscript of the font or null |
| 36 | * |
| 37 | * @throws IOException if something went wrong when accessing the font data |
| 38 | */ |
| 39 | String getName() throws IOException; |
| 40 | |
| 41 | /** |
| 42 | * Returns the font's bounding box in PostScript units. |
| 43 | * |
| 44 | * @return the bounding box of the font |
| 45 | * |
| 46 | * @throws IOException if something went wrong when accessing the font data |
| 47 | */ |
| 48 | BoundingBox getFontBBox() throws IOException; |
| 49 | |
| 50 | /** |
| 51 | * Returns the FontMatrix in PostScript units. |
| 52 | * |
| 53 | * @return the font matrix |
| 54 | * |
| 55 | * @throws IOException if something went wrong when accessing the font data |
| 56 | */ |
| 57 | List<Number> getFontMatrix() throws IOException; |
| 58 | |
| 59 | /** |
| 60 | * Returns the path for the character with the given name. |
| 61 | * |
| 62 | * @param name PostScript glyph name |
| 63 | * @return glyph path |
| 64 | * @throws IOException if the path could not be read |
| 65 | */ |
| 66 | GeneralPath getPath(String name) throws IOException; |
| 67 | |
| 68 | /** |
| 69 | * Returns the advance width for the character with the given name. |
| 70 | * |
| 71 | * @param name PostScript glyph name |
| 72 | * @return glyph advance width |
| 73 | * @throws IOException if the path could not be read |
| 74 | */ |
| 75 | float getWidth(String name) throws IOException; |
| 76 | |
| 77 | /** |
| 78 | * Returns true if the font contains the given glyph. |
| 79 | * |
| 80 | * @param name PostScript glyph name |
| 81 | * |
| 82 | * @return true if the font contains a glyph with the given name, otherwise false |
| 83 | * |
| 84 | * @throws IOException if something went wrong when accessing the font data |
| 85 | */ |
| 86 | boolean hasGlyph(String name) throws IOException; |
| 87 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…