Skip to content

Commit 7a8dd0f

Browse files
committed
PDFBOX-5920: use name of glyph
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1922939 13f79535-47bb-0310-9956-ffa450edef68
1 parent 134e202 commit 7a8dd0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDType1CFont.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ public float getStringWidth(String string) throws IOException
424424
{
425425
int codePoint = string.codePointAt(i);
426426
String name = getGlyphList().codePointToName(codePoint);
427-
if (!cffFont.hasGlyph(string))
427+
if (!cffFont.hasGlyph(name))
428428
{
429429
throw new IllegalArgumentException(
430430
String.format("U+%04X ('%s') is not available in font %s",

0 commit comments

Comments
 (0)