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

Integrate Harffbuzz freetype to render Khmer Burmese and hindi #1439

Open
wants to merge 91 commits into
base: main
Choose a base branch
from

Conversation

alanchenboy
Copy link
Collaborator

@codecov
Copy link

codecov bot commented Jul 28, 2023

Codecov Report

Attention: Patch coverage is 93.22382% with 33 lines in your changes are missing coverage. Please review.

Project coverage is 85.78%. Comparing base (04be6ec) to head (6b02cba).

Current head 6b02cba differs from pull request most recent head d65c81d

Please upload reports for the commit d65c81d to get more accurate results.

Files Patch % Lines
src/mbgl/text/shaping.cpp 85.56% 14 Missing ⚠️
src/mbgl/text/harfbuzz.cpp 78.94% 8 Missing ⚠️
src/mbgl/text/glyph_manager.cpp 92.59% 4 Missing ⚠️
src/mbgl/text/glyph.cpp 91.66% 2 Missing ⚠️
src/mbgl/layout/layout.hpp 50.00% 1 Missing ⚠️
src/mbgl/layout/symbol_layout.cpp 98.90% 1 Missing ⚠️
src/mbgl/storage/resource.cpp 87.50% 1 Missing ⚠️
src/mbgl/tile/geometry_tile_worker.cpp 96.77% 1 Missing ⚠️
src/mbgl/util/i18n.cpp 91.66% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1439       +/-   ##
===========================================
+ Coverage   59.30%   85.78%   +26.48%     
===========================================
  Files         580      566       -14     
  Lines       28674    28188      -486     
  Branches    11276        0    -11276     
===========================================
+ Hits        17006    24182     +7176     
+ Misses       4139     4006      -133     
+ Partials     7529        0     -7529     

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

vendor/BUILD.bazel Outdated Show resolved Hide resolved
vendor/harfbuzz Outdated Show resolved Hide resolved
@alanchenboy
Copy link
Collaborator Author

Swipe out macos end is such a pain for me, I have to use my personal computer to fix unit tests

@ntadej
Copy link
Collaborator

ntadej commented Aug 2, 2023

I wonder if we want to make this an optional feature? This would allow us to fix Qt later for example.

Also what is the binary size increase? (@louwers, didn't we have a CI test for that in the past? I guess the rest of the actions need to pass.)

@alanchenboy
Copy link
Collaborator Author

https://github.com/maplibre/maplibre-native/actions/runs/5747452827/job/15578480347 does anybody known what is the reason for this failure?

@alanchenboy
Copy link
Collaborator Author

I didn't have linux end, will fix linux CI in next weeks.

@louwers
Copy link
Collaborator

louwers commented Aug 4, 2023

@alanchenboy That means the iOS render tests are failing. Did you run them locally?

@alanchenboy
Copy link
Collaborator Author

alanchenboy commented Feb 20, 2024

Pipelines fixed, lucky me. let me add some complex text render tests to finish this PR.

@louwers louwers added this to the Additional Writing Systems milestone Feb 20, 2024
@louwers
Copy link
Collaborator

louwers commented Feb 22, 2024

@ramSeraph

This is surprising.. I do mean pulling in data, not code. I was asking this because a lot of harfbuzz binary size might be coming from unicode data it loads, which can be pulled in lazily.

That is an interesting idea.

Doesn't maplibre-native already have a plugin architecture? Can this particular feature be moved to a plugin?

Not for the C++ Core at the moment.

@alanchenboy Congrats! 💯 Can you merge main in?

@wipfli
Copy link
Contributor

wipfli commented Feb 26, 2024

If this is ready for review then I would propose to have a discussion in the style spec repo about the changes needed to the style spec.

@robinhood245
Copy link

@alanchenboy Thank you so much for the effort you are putting in. I was hoping to try it out, but whenever I am trying to build from the code for Android, it's failing. Can you please help me build from the code?

@alanchenboy
Copy link
Collaborator Author

alanchenboy commented Feb 27, 2024

@alanchenboy Thank you so much for the effort you are putting in. I was hoping to try it out, but whenever I am trying to build from the code for Android, it's failing. Can you please help me build from the code?

Hi @robinhood245 the pipeline is passed so I think the CMake change is correct, but the new vendor requires higher CMake version, so if you installed cmake 3.18 in your Android studio, it will use that and cause the build failure. I update cmakeVersion in dependencies.gradle to from 3.18.1+ to 3.19.1+. And the app can build by android studio.
So maybe we should also update this file, or we build our own cmake file to build freetype and harfbuzz, cause most vendors are using Maplibe cmake instead of vendors' cmake file.

I roll back cmake upgrade, and I can compile the branch in my Android studio (it failed last time because of VPN setting)

Screenshot 2024-02-28 at 08 38 33

@alanchenboy
Copy link
Collaborator Author

https://app.codecov.io/gh/maplibre/maplibre-native/commit/2f76cee32dff34d10f43f8abc4985f77a9578680 How can I fix this pipeline, is it a requirement for approve?

@louwers
Copy link
Collaborator

louwers commented Mar 6, 2024

It means there are some code paths that are not reached during testing.

It's not a hard requirement at the moment.

@maxammann
Copy link
Collaborator

Just came across this? What's the status of this?

I believe the testing coverage of the layouting is not very good overall, so I think this should not be a blocker. But maybe I just have not yet found comprehensive tests for the symbol_layout.cpp file :)

@alanchenboy
Copy link
Collaborator Author

alanchenboy commented Oct 16, 2024

@maxammann
I think this approach needs to edit the style specification to support downloading font files via style config. Before this done we should not merge this PR.
I think @wipfli once helped me edit the specification, any update?

@1ec5
Copy link
Contributor

1ec5 commented Oct 16, 2024

edit the style specification to support downloading font files via style config

See also the discussion in maplibre/maplibre-gl-js#4564 (comment). Maybe we should coordinate on a strategy for making font selection more flexible across platforms.

@louwers
Copy link
Collaborator

louwers commented Oct 16, 2024

Ideally we should create an issue (and then a PR) in the MapLibre Style Spec repo to achieve consensus on the style spec changes and have it officially changed before merging.

Edit: as Oliver mentioned:

If this is ready for review then I would propose to have a discussion in the style spec repo about the changes needed to the style spec.

@alanchenboy Could you create an issue there? It would be great to get this merged.

@alanchenboy
Copy link
Collaborator Author

Hi @louwers here is the issue on style spec repo: maplibre/maplibre-style-spec#868.

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.

10 participants