-
Notifications
You must be signed in to change notification settings - Fork 11
Closed
Description
Hi Thomas,
When using a non-standard font that {systemfonts} can find without any issues, {textshaping} is reporting the wrong font in the font_path column.
In the example below, Arial is reported as the font even though it was instructed to give the Impact font.
It correctly finds a fallback for \u3053, but even without needing fallback it reports the wrong font.
Hopefully a fix for this can be included in the 0.4.0 release :)
textshaping::shape_text("X \u3053 Y", family = "Impact")$shape
#> glyph index metric_id string_id x_offset y_offset
#> 1 1 59 1 1 0.00000 2.546875
#> 2 2 3 1 1 8.00000 2.546875
#> 3 3 20665 1 1 11.32812 2.546875
#> 4 4 3 1 1 19.62500 2.546875
#> 5 5 60 1 1 22.73438 2.546875
#> font_path font_index font_size advance ascender
#> 1 C:\\Windows\\Fonts\\arial.ttf 0 12 8.000000 10.85938
#> 2 C:\\Windows\\Fonts\\arial.ttf 0 12 3.328125 10.85938
#> 3 C:\\Windows\\Fonts\\msgothic.ttc 1 12 8.296875 10.31250
#> 4 C:\\Windows\\Fonts\\arial.ttf 0 12 3.109375 10.85938
#> 5 C:\\Windows\\Fonts\\arial.ttf 0 12 8.000000 10.85938
#> descender
#> 1 -2.546875
#> 2 -2.546875
#> 3 -1.687500
#> 4 -2.546875
#> 5 -2.546875Created on 2024-05-16 with reprex v2.1.0
This is on a windows machine with a fresh install of {systemfonts} + {textshaping} from GitHub.
Metadata
Metadata
Assignees
Labels
No labels