/** * Does any spacing adjustments that may have been specified. */ protected void adjustTextSpacing() { if (spacingApplied) // Nothing to do... return; if (!layoutApplied) // Must have clean layout to do spacing... doExplicitGlyphLayout(); aci.first(); Boolean customSpacing = (Boolean) aci.getAttribute( GVTAttributedCharacterIterator.TextAttribute.CUSTOM_SPACING); if ((customSpacing != null) && customSpacing.booleanValue()) { advance = doSpacing ((Float) aci.getAttribute (GVTAttributedCharacterIterator.TextAttribute.KERNING), (Float) aci.getAttribute (GVTAttributedCharacterIterator.TextAttribute.LETTER_SPACING), (Float) aci.getAttribute (GVTAttributedCharacterIterator.TextAttribute.WORD_SPACING)); // Basic layout is now messed up... layoutApplied = false; } // This will clear layoutApplied if it mucks with the current // character positions. applyStretchTransform(!adjSpacing); spacingApplied = true; pathApplied = false; }
/** * Does any spacing adjustments that may have been specified. */ protected void adjustTextSpacing() { if (spacingApplied) // Nothing to do... return; if (!layoutApplied) // Must have clean layout to do spacing... doExplicitGlyphLayout(); aci.first(); Boolean customSpacing = (Boolean) aci.getAttribute( GVTAttributedCharacterIterator.TextAttribute.CUSTOM_SPACING); if ((customSpacing != null) && customSpacing) { advance = doSpacing ((Float) aci.getAttribute (GVTAttributedCharacterIterator.TextAttribute.KERNING), (Float) aci.getAttribute (GVTAttributedCharacterIterator.TextAttribute.LETTER_SPACING), (Float) aci.getAttribute (GVTAttributedCharacterIterator.TextAttribute.WORD_SPACING)); // Basic layout is now messed up... layoutApplied = false; } // This will clear layoutApplied if it mucks with the current // character positions. applyStretchTransform(!adjSpacing); spacingApplied = true; pathApplied = false; }
/** * Does any spacing adjustments that may have been specified. */ protected void adjustTextSpacing() { if (spacingApplied) // Nothing to do... return; if (!layoutApplied) // Must have clean layout to do spacing... doExplicitGlyphLayout(); aci.first(); Boolean customSpacing = (Boolean) aci.getAttribute( GVTAttributedCharacterIterator.TextAttribute.CUSTOM_SPACING); if ((customSpacing != null) && customSpacing) { advance = doSpacing ((Float) aci.getAttribute (GVTAttributedCharacterIterator.TextAttribute.KERNING), (Float) aci.getAttribute (GVTAttributedCharacterIterator.TextAttribute.LETTER_SPACING), (Float) aci.getAttribute (GVTAttributedCharacterIterator.TextAttribute.WORD_SPACING)); // Basic layout is now messed up... layoutApplied = false; } // This will clear layoutApplied if it mucks with the current // character positions. applyStretchTransform(!adjSpacing); spacingApplied = true; pathApplied = false; }