Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@abelokon0711
Copy link
Contributor

@abelokon0711 abelokon0711 commented Nov 23, 2021

This PR adds missing text stroke support when using the DOM and bitmap canvas by evaluating the TextStyle 'foreground' property.

On the DOM canvas it creates the corresponding CSS text stroke style. On the bitmap canvas it uses the HTML canvas strokeText method.

Fixes #46683.

Is there a particular reason why in the current implementation the 'foreground' property is not used for painting text strokes in the HTML renderer?

Goldens: flutter/goldens#230

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@flutter-dashboard flutter-dashboard bot added platform-web Code specifically for the web engine needs tests labels Nov 23, 2021
@google-cla google-cla bot added the cla: no label Nov 23, 2021
@abelokon0711
Copy link
Contributor Author

@googlebot I fixed it

Copy link
Contributor

@mdebbar mdebbar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for implementing this! I think this PR is almost ready to go after some minor suggestions are fixed.

@abelokon0711
Copy link
Contributor Author

Thank you for your helpful suggestions! 😃

Copy link
Contributor

@mdebbar mdebbar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes! This PR looks good to me with only 2 minor suggestions.

Once the goldens PR is merged, you should update the goldens_lock.yaml file to point to the new SHA in the flutter/goldens repo.

@mdebbar
Copy link
Contributor

mdebbar commented Dec 3, 2021

@abelokon0711 I'm unable to add new commits to this PR. Could you please make sure that you checked the "Allow edits by maintainers" box?

@abelokon0711
Copy link
Contributor Author

@mdebbar It's checked now 👍 Sorry for the inconvenience

Copy link
Contributor

@mdebbar mdebbar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this great contribution!

@mdebbar mdebbar added the waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land. label Dec 4, 2021
@fluttergithubbot fluttergithubbot merged commit 0add385 into flutter:main Dec 4, 2021
@flar
Copy link
Contributor

flar commented Dec 4, 2021

This PR is breaking the builds due to the undefined name "domRenderer".

See #30038 for a potential fix.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes needs tests platform-web Code specifically for the web engine waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[web] Text foreground paint / stroke not working

4 participants