fix outlines around scaled fonts (#2845)

This commit is contained in:
Jakub Valtar
2014-09-11 19:38:52 +02:00
parent 4274b1dada
commit 7723e1df40
+7 -1
View File
@@ -151,9 +151,15 @@ class FontTexture implements PConstants {
} else if (resize) {
// Replacing old smaller texture with larger one.
// But first we must copy the contents of the older
// texture into the new one.
// texture into the new one. Setting blend mode to
// REPLACE to preserve color of transparent pixels.
Texture tex0 = textures[currentTex];
tex.pg.pushStyle();
tex.pg.blendMode(REPLACE);
tex.put(tex0);
tex.pg.popStyle();
textures[currentTex] = tex;
pg.setCache(images[currentTex], tex);