We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6103d6a + 23d2bcf commit c6bcd47Copy full SHA for c6bcd47
1 file changed
core/src/processing/opengl/FontTexture.java
@@ -151,9 +151,15 @@ public boolean addTexture(PGraphicsOpenGL pg) {
151
} else if (resize) {
152
// Replacing old smaller texture with larger one.
153
// But first we must copy the contents of the older
154
- // texture into the new one.
+ // texture into the new one. Setting blend mode to
155
+ // REPLACE to preserve color of transparent pixels.
156
Texture tex0 = textures[currentTex];
157
+
158
+ tex.pg.pushStyle();
159
+ tex.pg.blendMode(REPLACE);
160
tex.put(tex0);
161
+ tex.pg.popStyle();
162
163
textures[currentTex] = tex;
164
165
pg.setCache(images[currentTex], tex);
0 commit comments