dyn.b_28_gphxjmentkkbyxnl.B28 |
[Caching glyph ﻹ at 2022/04/11 16:56:37, Caching glyph ﻺ at 2022/04/11 16:56:37, Caching glyph ﻻ at 2022/04/11 16:56:37, Caching glyph ﻼ at 2022/04/11 16:56:37, Caching glyph at 2022/04/11 16:56:37, Caching glyph at 2022/04/11 16:56:37, Caching glyph at 2022/04/11 16:56:37, Caching glyph at 2022/04/11 16:56:37, Caching glyph  at 2022/04/11 16:56:37, Caching glyph � at 2022/04/11 16:56:37] |
60 |
yes |
Glyph Recognizer By Brightness 30
Cached Latin Glyphs in top left corner 34
|
Cached ALL Rendered Glyphs |
000000 |
096e88ff05550722420996bc35e8cf0e |
FFFFFF |
Reified Font 26 |
User stefan |
50 |
dyn.b_28_gphxjmentkkbyxnl$B28 |
40 |
28 |
extends BWithResources;
int fontSize = 40, w = 50, h = 50;
S bgColor = "FFFFFF";
S textColor = "000000";
transient LS glyphList;
transient Map<S, IIntegralImage> glyphByHash;
transient SS glyphHashes;
transient Map<S, IIntegralImage> cachedGlyphs;
transient volatile bool done;
void _activateImpl :: after {
glyphByHash = syncMap();
cachedGlyphs = syncMap();
glyphHashes = syncMap();
glyphList = syncL();
}
void _deactivateImpl :: after {
// These are huge, so we make sure to forget
glyphByHash = cachedGlyphs = null;
glyphHashes = null;
glyphList = null;
}
Font font() {
ret deriveFont(sansSerif(fontSize), fontSize);
}
IIntegralImage renderGlyph(S text) {
BufferedImage img = newBufferedImage(w, h, awtColor(bgColor));
var g = imageGraphics(img);
g.setFont(font());
drawCenteredText(g, text, 0, 0, w, h, awtColor(textColor));
ret BWIntegralImage(img);
}
void cacheAllGlyphs {
Font font = font();
for i to 65536:...
|
Custom code loaded |