Skip to content

Commit c6bcd47

Browse files
committed
Merge pull request #2856 from JakubValtar/bugfix-font-outlines
Fix outlines around scaled fonts (#2845)
2 parents 6103d6a + 23d2bcf commit c6bcd47

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

core/src/processing/opengl/FontTexture.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,15 @@ public boolean addTexture(PGraphicsOpenGL pg) {
151151
} else if (resize) {
152152
// Replacing old smaller texture with larger one.
153153
// But first we must copy the contents of the older
154-
// texture into the new one.
154+
// texture into the new one. Setting blend mode to
155+
// REPLACE to preserve color of transparent pixels.
155156
Texture tex0 = textures[currentTex];
157+
158+
tex.pg.pushStyle();
159+
tex.pg.blendMode(REPLACE);
156160
tex.put(tex0);
161+
tex.pg.popStyle();
162+
157163
textures[currentTex] = tex;
158164

159165
pg.setCache(images[currentTex], tex);

0 commit comments

Comments
 (0)