-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
Parameter to control text line height/leading #152
Comments
So I've been doing some reading and according to these Flutter docs LineHeight appears to be a combination of the However, we calculate the This, as you can imagine, leads me to some confusion. @antonfirsov @tocsoft I'll definitely need your guidance here. Should we be simply adding a On a side note we should refactor |
I wouldn't add a So if you want to increase the spacing between the lines you would provide a number > 1 and to get lines closer a value < 1 with one being our current size and default value.... I also would not stop negative values as I can see it producing some interesting results and can't see why it would break anything. |
Is Word something we want to base our approach on? Perhaps we should follow the WC3 CSS Fonts Module Level 4 spec and provide overrides for https://www.w3.org/TR/css-fonts-4/#font-metrics-override-desc I'm trying to figure out what Skia and System.Drawing do but it's bizarrely difficult to discover an straight answer. |
Ok @tocsoft I did some reading and, as ever, your plan is definitely the most sane! I'm assuming applying the value would be as simple as this then? var offset = new Vector2(0, (lineHeightOfFirstLine * options.LineSpacing) - top); Edit. Nope. Adjusting that value appears to offset the first line and doesn't affect wrapped lines. |
Follow-up on SixLabors/ImageSharp.Drawing#112:
We need to introduce a parameter in title in RenderOptions.
That parameter should then somehow alter the following
offset
value:Fonts/src/SixLabors.Fonts/TextLayout.cs
Line 279 in 4beaff1
/cc @tocsoft @JimBobSquarePants
The text was updated successfully, but these errors were encountered: