diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2023-01-04 17:23:13 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2023-01-04 17:23:13 +0100 |
| commit | 13f2ea664a9c5e3fdf318ef75914e2e876b5aaef (patch) | |
| tree | e8ea772741ca82f88f3cc881a44c4a763d5bb1de /src/drivers/Unix | |
| parent | d3988f9bdcd3cf463113b43fb0f1f22724e69f42 (diff) | |
Cairo/Pango: compute character widths fast and string widths accurately
This commit has Fl_Cairo_Graphics_Driver compute string widths in 2 ways:
1) when the string contains several unicode characters, the width of the
whole string is computed, accounting for kerning when it occurs;
2) when the string contains a single unicode character, its width is
computed, memorised, and re-used next time it's necessary.
The effect of this approach is
- Fl_Text_Display is fast because it uses memorised single character widths repeatedly
- Fl_Input is drawn accurately because the cursor position is determined
by string widths, not by sums of character widths.
Diffstat (limited to 'src/drivers/Unix')
0 files changed, 0 insertions, 0 deletions
