Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Space not included in layout #194

Open
MinusGix opened this issue Oct 5, 2023 · 1 comment
Open

Space not included in layout #194

MinusGix opened this issue Oct 5, 2023 · 1 comment

Comments

@MinusGix
Copy link

MinusGix commented Oct 5, 2023

Layout glyphs don't seem to always include the space character.

For example, with wrapping (I think I ran into another case, but I'm failing to remember how):
image
(editor-libcosmic example)

Glyph: LayoutGlyph { start: 146, end: 147, font_size: 14.0, font_id: ID(InnerId(1038v1)), glyph_id: 75, x: 968.5338, y: 0.0, w: 8.651999, level: Level(0), x_offset: 0.0, y_offset: 0.0, color_opt: Some(Color(4292071624)), metadata: 0 }
        portion of text: "h"

So 'h' is the last glyph, which is what end of line and clicking past the end of that line stop at - rather than the expected space (like other editors).
At first I thought the space was skipped over because it would provide no positioning, but it seems like multiple spaces will get correctly handled?

(Of course, right after that space is the same index as the i in ipsum on the next line but affinity can handle that)

Is there some good way to get past that? I presume no since the examples don't implement it, so it may be a bug.

@grovesNL
Copy link
Contributor

Related to #155

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants