Author: jahewson
Date: Thu Oct 29 05:48:04 2015
New Revision: 1711181

URL: http://svn.apache.org/viewvc?rev=1711181&view=rev
Log:
PDFBOX-3062: Deprecate PDFont#getHeight()

Modified:
    
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDFontLike.java

Modified: 
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDFontLike.java
URL: 
http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDFontLike.java?rev=1711181&r1=1711180&r2=1711181&view=diff
==============================================================================
--- 
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDFontLike.java
 (original)
+++ 
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDFontLike.java
 Thu Oct 29 05:48:04 2015
@@ -61,14 +61,26 @@ public interface PDFontLike
 
     /**
      * Returns the height of the given character, in glyph space. This can be 
expensive to
-     * calculate. Results are only approximate.
-     *
+     * calculate. Results are only approximate.</p>
+     * 
+     * Warning: This method is deprecated in PDFBox 2.0 because there is no 
meaningful value
+     * which it can return. The {@link #getWidth} method returns the advance 
width of a glyph,
+     * but there is no corresponding advance height. The logical height of a 
character is the same
+     * for every character in a font, so if you want that, retrieve the font 
bbox's height. 
+     * Otherwise if you want the visual bounds of the glyph then call 
getPath(..) on the appropriate
+     * PDFont subclass to retrieve the glyph outline as a GeneralPath.
+     * 
      * @param code character code
+     * @deprecated Use {@link #getBoundingBox().getHeight()} instead.
      */
+    @Deprecated
     float getHeight(int code) throws IOException;
 
     /**
-     * Returns the advance width of the given character, in glyph space.
+     * Returns the advance width of the given character, in glyph space.</p>
+     * 
+     * If you want the visual bounds of the glyph then call getPath(..) on the 
appropriate
+     * PDFont subclass to retrieve the glyph outline as a GeneralPath instead.
      *
      * @param code character code
      */


Reply via email to