Skip to content

Commit

Permalink
Merge pull request #81103 from bruvzg/svg_em
Browse files Browse the repository at this point in the history
[TextServer] Fix SVG emoji placement.
  • Loading branch information
akien-mga committed Aug 30, 2023
2 parents d4465db + 29bad29 commit 3f7c1bc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions modules/text_server_adv/thorvg_svg_in_ot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ FT_Error tvg_svg_in_ot_preset_slot(FT_GlyphSlot p_slot, FT_Bool p_cache, FT_Poin
ERR_FAIL_V_MSG(FT_Err_Invalid_SVG_Document, "Failed to get SVG bounds.");
}

gl_state.bmp_y = -min_y * gl_state.h / new_h;
gl_state.bmp_x = min_x * gl_state.w / new_w;
gl_state.bmp_y = gl_state.h + metrics.descender / 64.f;
gl_state.bmp_x = 0;

gl_state.ready = true;
}
Expand Down
4 changes: 2 additions & 2 deletions modules/text_server_fb/thorvg_svg_in_ot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ FT_Error tvg_svg_in_ot_preset_slot(FT_GlyphSlot p_slot, FT_Bool p_cache, FT_Poin
ERR_FAIL_V_MSG(FT_Err_Invalid_SVG_Document, "Failed to get SVG bounds.");
}

gl_state.bmp_y = -min_y * gl_state.h / new_h;
gl_state.bmp_x = min_x * gl_state.w / new_w;
gl_state.bmp_y = gl_state.h + metrics.descender / 64.f;
gl_state.bmp_x = 0;

gl_state.ready = true;
}
Expand Down

0 comments on commit 3f7c1bc

Please sign in to comment.