summaryrefslogtreecommitdiff
path: root/src/forms_bitmap.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-01-04 17:23:13 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-01-04 17:23:13 +0100
commit13f2ea664a9c5e3fdf318ef75914e2e876b5aaef (patch)
treee8ea772741ca82f88f3cc881a44c4a763d5bb1de /src/forms_bitmap.cxx
parentd3988f9bdcd3cf463113b43fb0f1f22724e69f42 (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/forms_bitmap.cxx')
0 files changed, 0 insertions, 0 deletions