Skip to content

Commit

Permalink
After closing all registered TTF Collections we should also clear
Browse files Browse the repository at this point in the history
the list.
  • Loading branch information
rototor committed Apr 24, 2018
1 parent 3cd0bda commit e55e602
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,10 @@ public FSFont resolveFont(SharedContext renderingContext, FontSpecification spec
return resolveFont(renderingContext, spec.families, spec.size, spec.fontWeight, spec.fontStyle, spec.variant);
}

/**
* Free all font resources (i.e. open files), the document should already be closed.
*/
/**
* Free all font resources (i.e. open files), the document should already be
* closed.
*/
public void close() {
for (FontDescription fontDescription : _fontCache.values()) {
/*
Expand All @@ -92,6 +93,7 @@ public void close() {
e.printStackTrace();
}
}
_collectionsToClose.clear();
}

@Deprecated
Expand Down

0 comments on commit e55e602

Please sign in to comment.