summaryrefslogtreecommitdiffstats
path: root/minuitwrp
diff options
context:
space:
mode:
authorVojtech Bocek <vbocek@gmail.com>2015-03-15 16:50:26 +0100
committerDees Troy <dees_troy@teamw.in>2015-03-19 16:50:08 +0100
commit54cf108c846c69715533292c9c2e3269850b8219 (patch)
treef41391a656590d74f9d2682eb4db11f907be4f3b /minuitwrp
parentFix deadlock in gr_ttf_measureEx if called before the height is cached (diff)
downloadandroid_bootable_recovery-54cf108c846c69715533292c9c2e3269850b8219.tar
android_bootable_recovery-54cf108c846c69715533292c9c2e3269850b8219.tar.gz
android_bootable_recovery-54cf108c846c69715533292c9c2e3269850b8219.tar.bz2
android_bootable_recovery-54cf108c846c69715533292c9c2e3269850b8219.tar.lz
android_bootable_recovery-54cf108c846c69715533292c9c2e3269850b8219.tar.xz
android_bootable_recovery-54cf108c846c69715533292c9c2e3269850b8219.tar.zst
android_bootable_recovery-54cf108c846c69715533292c9c2e3269850b8219.zip
Diffstat (limited to 'minuitwrp')
-rw-r--r--minuitwrp/truetype.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/minuitwrp/truetype.c b/minuitwrp/truetype.c
index e8a162945..a286449ed 100644
--- a/minuitwrp/truetype.c
+++ b/minuitwrp/truetype.c
@@ -369,6 +369,11 @@ static int gr_ttf_copy_glyph_to_surface(GGLSurface *dest, FT_BitmapGlyph glyph,
dest_itr += (offY + base - glyph->top)*dest->stride + (offX + glyph->left);
+ // FIXME: if glyph->left is negative and everything else is 0 (e.g. letter 'j' in Roboto-Regular),
+ // the result might end up being before the buffer - I'm not sure how to properly handle this.
+ if(dest_itr < dest->data)
+ dest_itr = dest->data;
+
for(y = 0; y < glyph->bitmap.rows; ++y)
{
memcpy(dest_itr, src_itr, glyph->bitmap.width);