-
Notifications
You must be signed in to change notification settings - Fork 860
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
Line Height is not calculating based on font size. #28
Comments
Oh true if you have custom style |
I think a good solution is to allow passing both custom style and its corresponding line height. |
this was from your example. i just added following line for that QuillEditor(
//Rest of parameter
sizeHuge: TextStyle(fontSize:64.0)
) |
Our current code does not support passing line height yet. Also line height should be optional. |
Currently in a block each line is given the same height. Huge size is an attribute of text span. |
Ok this is more complicated than I thought. |
Flutters default rich text rendering has this. |
Currently we use RichText for the whole |
yes. |
@ritheshSalyan I don't think there is a |
This is quilljs on web, the generated delta has
You can play on https://bulletjournal.us/collab/?uid=W4LOcDQo |
You can play on https://bulletjournal.us/collab/?uid=W4LOcDQo |
Oh I see. Custom font-family can also be passed by the way. |
Yes, not on mobile. |
Custom Line height is a much tougher problem. |
Just used this... |
I found solution for this. RichText child = RichText(
text: _buildTextSpan(context),
textAlign: textAlign,
textDirection: textDirection,
strutStyle: strutStyle,
textScaleFactor: MediaQuery.textScaleFactorOf(context),
); with this RichText child = RichText(
text: TextSpan(children: [_buildTextSpan(context)]),
textAlign: textAlign,
textDirection: textDirection,
strutStyle: strutStyle,
textScaleFactor: MediaQuery.textScaleFactorOf(context),
); in TextLine builder. it worked for me. |
Nice |
@ritheshSalyan let me know if u prefer us to submit the change instead or u want to send a pull request |
The current code already return
|
yes. |
@ritheshSalyan I submitted d644223 packing this change |
@ritheshSalyan closing. If you still have issue you can reopen it |
yes. |
did you test it for bullet points and check attributes? |
No, probably need to update sample_data.json for that |
Closing due to inactivity, feel free to reopen. |
@ArjanAswal @singerdmx I think by re-reading this issue that the problem came back. Maybe it was fixed at some point but isn't anymore. Is it possible to re-open the issue? |
@ArjanAswal @singerdmx Actually I found that the rendering mode "html" causes the problem. Using the default "canvaskit" mode fixes it. I also discussed a problem with empty line height here: #621. |
when we have a large font size line-height has some problem.
The text was updated successfully, but these errors were encountered: