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

Fix/cjk unicode lookup #5421

Merged
merged 16 commits into from
Feb 2, 2025
Merged

Conversation

Kanahiro
Copy link
Contributor

@Kanahiro Kanahiro commented Jan 28, 2025

Launch Checklist

  • Confirm your changes do not include backports from Mapbox projects (unless with compliant license) - if you are not sure about this, please ask!

  • Briefly describe the changes in this PR.

  • Link to related issues.

  • Include before/after visuals or gifs if this PR includes visual changes.

  • Write tests for all new functionality.

  • Add an entry to CHANGELOG.md under the ## main section.

  • Issue: [label] Full-width hyphen in Japanese is accidently disappeared #5420

before

  • あーい、う。 becomes あいう. some symbols are ignored.

Screenshot 2025-01-29 at 9 38 24

after

Screenshot 2025-01-29 at 9 36 30

Copy link

codecov bot commented Jan 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.95%. Comparing base (bedcb86) to head (adf4218).
Report is 8 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5421   +/-   ##
=======================================
  Coverage   91.94%   91.95%           
=======================================
  Files         282      282           
  Lines       39039    39050   +11     
  Branches     6849     6860   +11     
=======================================
+ Hits        35896    35907   +11     
  Misses       3016     3016           
  Partials      127      127           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@HarelM
Copy link
Collaborator

HarelM commented Jan 28, 2025

Thanks for taking the time to solve this!
Please add a render test to make sure this behavior is tested and kept in the future.
Also looks like a render test failed due to the changes made, please are that you take care of it as well.

@Kanahiro
Copy link
Contributor Author

@1ec5 @HarelM
Thanks for reviewing!
I improved mycodes and added tests. Please check it.

@Kanahiro
Copy link
Contributor Author

Kanahiro commented Jan 29, 2025

Tests / Render tests (windows-latest, 0) (pull_request) faled but rendered image of label could have difference between Ubuntu and Windows. I'm not sure how can I clear this. Please advice me if anyone have knowledge.

I understand I should make expected image as expected-ubuntu.png.
I wonder if we have to make on all OS. I have all machines but it may be not easy for many developers..

@Kanahiro
Copy link
Contributor Author

Kanahiro commented Jan 29, 2025

I can't run $env:UPDATE=$true; npm run test-render -- text-local-ideographs/cjk-symbols in Windows.
Could anyone run and generate expected-windows.png?

I followed this docs but it doesn't work for me.
https://github.com/maplibre/maplibre-gl-js/tree/main/test/integration#updating-results-of-render-test-results

@HarelM
Copy link
Collaborator

HarelM commented Jan 29, 2025

You can download the render test html report from the failing CI run, open it in the browser and right click to save the image and check it in.
I guess this option should be mentioned in the readme as well...

@HarelM
Copy link
Collaborator

HarelM commented Jan 29, 2025

You don't have to create all the image, just those that are different between OSs.
In this case, because it is using system fonts you get different results, this is not true for most cases but we have the relevant infrastructure to solve this.

@Kanahiro
Copy link
Contributor Author

@HarelM Thanks for advice! fixed

@Kanahiro Kanahiro requested a review from HarelM February 1, 2025 23:06
@HarelM HarelM merged commit c1415b8 into maplibre:main Feb 2, 2025
17 checks passed
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

Successfully merging this pull request may close these issues.

3 participants