* {@inheritDoc}
*/
public char mapChar(char c) {
- load(true);
+ if ( !isMetricsLoaded ) {
+ load(true);
+ }
return realFont.mapChar(c);
}
* {@inheritDoc}
*/
public boolean hasChar(char c) {
- load(true);
+ if ( !isMetricsLoaded ) {
+ load(true);
+ }
return realFont.hasChar(c);
}
* {@inheritDoc}
*/
public int getWidth(int i, int size) {
- load(true);
+ if ( !isMetricsLoaded ) {
+ load(true);
+ }
return realFont.getWidth(i, size);
}
*/
public CharSequence reorderCombiningMarks
( CharSequence cs, int[][] gpa, String script, String language ) {
- load(true);
+ if ( !isMetricsLoaded ) {
+ load(true);
+ }
if ( realFontDescriptor instanceof Substitutable ) {
return ((Substitutable)realFontDescriptor)
.reorderCombiningMarks(cs, gpa, script, language);
* {@inheritDoc}
*/
public boolean performsPositioning() {
- load(true);
+ if ( !isMetricsLoaded ) {
+ load(true);
+ }
if ( realFontDescriptor instanceof Positionable ) {
return ((Positionable)realFontDescriptor).performsPositioning();
} else {
*/
public int[][]
performPositioning ( CharSequence cs, String script, String language, int fontSize ) {
- load(true);
+ if ( !isMetricsLoaded ) {
+ load(true);
+ }
if ( realFontDescriptor instanceof Positionable ) {
return ((Positionable)realFontDescriptor)
.performPositioning(cs, script, language, fontSize);
*/
public int[][]
performPositioning ( CharSequence cs, String script, String language ) {
- load(true);
+ if ( !isMetricsLoaded ) {
+ load(true);
+ }
if ( realFontDescriptor instanceof Positionable ) {
return ((Positionable)realFontDescriptor)
.performPositioning(cs, script, language);
documents. Example: the fix of marks layering will be such a case when it's done.
-->
<release version="FOP Trunk" date="TBD">
+ <action context="Fonts" dev="GA" type="fix" fixes-bug="FOP-2194">
+ Optimize lazy font load invocation for hot methods.
+ </action>
<action context="Code" dev="GA" type="fix" fixes-bug="FOP-2192">
Fix checkstyle and findbugs warnings.
</action>