Skip to content

Commit

Permalink
优化字体缓存
Browse files Browse the repository at this point in the history
  • Loading branch information
qbhy committed Jul 24, 2020
1 parent 5976123 commit 68eb1bf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/com/qbhy/poster/drawable/Text.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ public static Font getDrawFont(String name, Integer fontSize) {
return tempFont;
}

return tempFont.deriveFont(fontSize);
if (tempFont.getSize() != fontSize) {
return tempFont.deriveFont(fontSize);
}

return tempFont;
}

@Override
Expand Down

0 comments on commit 68eb1bf

Please sign in to comment.