Advance_Snap_Smallfont_Size to 0 by default, removed position rounding in shape_text_uncached
Need to eventually make the rounding an option
This commit is contained in:
parent
8e8f25ba50
commit
470197cb6c
@ -14,7 +14,7 @@ package VEFontCache
|
||||
|
||||
import "base:runtime"
|
||||
|
||||
Advance_Snap_Smallfont_Size :: 12
|
||||
Advance_Snap_Smallfont_Size :: 0
|
||||
|
||||
Colour :: [4]f32
|
||||
Vec2 :: [2]f32
|
||||
|
@ -116,10 +116,11 @@ shape_text_uncached :: proc( ctx : ^Context, font : FontID, text_utf8 : string,
|
||||
append( & output.glyphs, parser_find_glyph_index( & entry.parser_info, codepoint ))
|
||||
advance, to_left_side_glyph = parser_get_codepoint_horizontal_metrics( & entry.parser_info, codepoint )
|
||||
|
||||
append( & output.positions, Vec2 {
|
||||
cast(f32) i32(position.x + 0.5),
|
||||
position.y
|
||||
})
|
||||
// append( & output.positions, Vec2 {
|
||||
// cast(f32) i32(position.x + 0.5),
|
||||
// position.y
|
||||
// })
|
||||
append( & output.positions, position )
|
||||
|
||||
position.x += f32(advance) * entry.size_scale
|
||||
prev_codepoint = codepoint
|
||||
|
Loading…
Reference in New Issue
Block a user