The font is SimSun(宋体), size 17, oblique=0.5, image zoom to 400%.
The special line is baseline. On display, it doesn't move on any value.
We suppose a bitmap format glyph:
- width=15
- rows=16
- bitmap_left=1
- bitmap_top=15
above offset=((15-1)*0.5+0.5)=7. Here 1 means baseline(not move).
below offset=((16-15)*0.5+0.5)=1
new width=15+7+1=23
new pitch=(23+7)/8=4
- width=23
- rows=16
- bitmap_left=1-1=0
- bitmap_top=15
ft_slant_bitmap_block()
first line index=0, slant value is max. it's=(15-0)*0.5+0.5=8. This include below offset.
calculate each row slant. For example, now slant above:
each row slant=slant_above-row_id*0.5. So row_id is smaller, the slant is bigger.
Then move every bit to new buffer, new x is (x+slant)
- src_byte = src_y * src_pitch + src_x / 8;
- src_bit = src_x % 8;
get src bit position(byte/bit)