Skip to content

Commit

Permalink
[cairo] Text polish and cleanup
Browse files Browse the repository at this point in the history
Panic when hit_test_position passed non char boundary

This matches the behaviour on the other platforms.

Remove a bunch of old cairo text tests

These were always fragile, and are now replaced by the shared tests
in piet-common.

Fixup hit-testing

- Keep track of the line x_offsets, to correctly resolve positions
  within lines
- For hit_test_position, don't use text.len()

Fixup hit_test_position again

Fixup trailing whitespace and ink rect calculations

Update snapshots

Increase fudge factor in tests to accomodate pango

Last bit of pre-merge cleanup
  • Loading branch information
cmyr committed Mar 26, 2021
1 parent 1b8496f commit 0b5696c
Show file tree
Hide file tree
Showing 3 changed files with 110 additions and 923 deletions.
Loading

0 comments on commit 0b5696c

Please sign in to comment.