Use f32 instead of i32 for lengths
This allows users to use logical coordinates instead of physical ones.
This commit is contained in:
parent
f08bea22ed
commit
4320ae6329
15 changed files with 203 additions and 155 deletions
|
|
@ -31,7 +31,7 @@ fn swash_image(
|
|||
// Build the scaler
|
||||
let mut scaler = context
|
||||
.builder(font.as_swash())
|
||||
.size(cache_key.font_size as f32)
|
||||
.size(f32::from_bits(cache_key.font_size_bits))
|
||||
.hint(true)
|
||||
.build();
|
||||
|
||||
|
|
@ -74,7 +74,7 @@ fn swash_outline_commands(
|
|||
// Build the scaler
|
||||
let mut scaler = context
|
||||
.builder(font.as_swash())
|
||||
.size(cache_key.font_size as f32)
|
||||
.size(f32::from_bits(cache_key.font_size_bits))
|
||||
.build();
|
||||
|
||||
// Scale the outline
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue