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

Spans of font sizes #64

Open
rhelmot opened this issue Jan 25, 2023 · 8 comments · May be fixed by #235
Open

Spans of font sizes #64

rhelmot opened this issue Jan 25, 2023 · 8 comments · May be fixed by #235

Comments

@rhelmot
Copy link
Contributor

rhelmot commented Jan 25, 2023

This is a highly requested feature from a rich text editor - being able to change font size within a line.

I looked into doing this myself but couldn't figure out a good way to get the attrs into layout without adding a font size field to the shaping structs, which seemed to be against the spirit of the design. If there's any advice on what changes would need to be made where to make this happen, I'll gladly do it.

@jackpot51
Copy link
Member

Color was also done in that sort of strange way. Perhaps both color and font size could be a struct specifically for overriding things later on in the process?

@geom3trik
Copy link

How much later though? Because wouldn't font size affect shaping? (it my not, I'm just wondering)

@jackpot51
Copy link
Member

font size affects layout, not shaping. Though I'd probably break up runs of different font sizes into different shaping runs to make sure they don't have ligatures connecting them.

@J-Cake
Copy link

J-Cake commented Feb 24, 2023

I just wanted to leave a plus one on this please. I would make heavy use of this

conradludgate added a commit to conradludgate/cosmic-text that referenced this issue Apr 1, 2023
@Dimchikkk
Copy link
Contributor

Yeah, I am implementing markdown support for my app using cosmic-text, and for implementing markdown headings this feature would be really handy, so plus one to it.

@Dimchikkk
Copy link
Contributor

Dimchikkk commented Jun 21, 2023

Hello, @conradludgate! I noticed that you referenced this specific issue and made some changes to the code. I'm curious to know the current status of those changes. Do you have any plans to submit a PR soon to address the issue? I'm quite interested in having this feature implemented and would appreciate any updates or information you can provide. Thank you!

@conradludgate
Copy link

Hello, @conradludgate! I noticed that you referenced this specific issue and made some changes to the code. I'm curious to know the current status of those changes. Do you have any plans to submit a PR soon to address the issue? I'm quite interested in having this feature implemented and would appreciate any updates or information you can provide. Thank you!

I believe it worked well enough for my needs. I don't have time right now to continue working on it, but I'm happy for someone to take my commit and open a PR from it

@Dimchikkk
Copy link
Contributor

@conradludgate I gave the changes a try, but they're not quite what I had in mind. What I really need is a feature to make spans bigger by adjusting the font size, so I can effectively implement markdown headings.

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