Author: tilman Date: Sun Nov 26 08:58:29 2023 New Revision: 1914133 URL: http://svn.apache.org/viewvc?rev=1914133&view=rev Log: PDFBOX-5660: optimize
Modified: pdfbox/branches/3.0/fontbox/src/main/java/org/apache/fontbox/ttf/gsub/GlyphSubstitutionDataExtractor.java Modified: pdfbox/branches/3.0/fontbox/src/main/java/org/apache/fontbox/ttf/gsub/GlyphSubstitutionDataExtractor.java URL: http://svn.apache.org/viewvc/pdfbox/branches/3.0/fontbox/src/main/java/org/apache/fontbox/ttf/gsub/GlyphSubstitutionDataExtractor.java?rev=1914133&r1=1914132&r2=1914133&view=diff ============================================================================== --- pdfbox/branches/3.0/fontbox/src/main/java/org/apache/fontbox/ttf/gsub/GlyphSubstitutionDataExtractor.java (original) +++ pdfbox/branches/3.0/fontbox/src/main/java/org/apache/fontbox/ttf/gsub/GlyphSubstitutionDataExtractor.java Sun Nov 26 08:58:29 2023 @@ -154,9 +154,12 @@ public class GlyphSubstitutionDataExtrac } } - LOG.debug("*********** extracting GSUB data for the feature: " - + featureRecord.getFeatureTag() + ", glyphSubstitutionMap: " - + glyphSubstitutionMap); + if (LOG.isDebugEnabled()) + { + LOG.debug("*********** extracting GSUB data for the feature: " + + featureRecord.getFeatureTag() + ", glyphSubstitutionMap: " + + glyphSubstitutionMap); + } gsubData.put(featureRecord.getFeatureTag(), Collections.unmodifiableMap(glyphSubstitutionMap)); @@ -188,7 +191,7 @@ public class GlyphSubstitutionDataExtrac extractDataFromMultipleSubstitutionFormat1Table(glyphSubstitutionMap, (LookupTypeMultipleSubstitutionFormat1) lookupSubTable); } - else + else if (LOG.isDebugEnabled()) { // usually null, due to being skipped in GlyphSubstitutionTable.readLookupTable() LOG.debug("The type " + lookupSubTable + " is not yet supported, will be ignored"); @@ -287,7 +290,10 @@ public class GlyphSubstitutionDataExtrac glyphsToBeSubstituted.add(componentGlyphID); } - LOG.debug("glyphsToBeSubstituted: " + glyphsToBeSubstituted); + if (LOG.isDebugEnabled()) + { + LOG.debug("glyphsToBeSubstituted: " + glyphsToBeSubstituted); + } putNewSubstitutionEntry(glyphSubstitutionMap, ligatureTable.getLigatureGlyph(), glyphsToBeSubstituted);