Skip to content

Conversation

@komplexon3
Copy link

Initial version of the "Web MapSDK".

I added the patch from the exploration-repository and added checks to pick the correct shader version.
@matzf I marked bits that need to be looked at with TO_CHECK.

Note that the referenced djinni version is a feature branch.

@komplexon3 komplexon3 requested a review from matzf January 20, 2026 08:28
@github-actions
Copy link

github-actions bot commented Jan 20, 2026

🖼️ Image Diff Test Failure

The image comparison tests failed. Rendered images don't match the expected golden images.

Investigate:

  1. 📎 Download image diff artifacts (look for test-image-diffs-576)
  2. Check *_diff.png (red = differences)
  3. Compare *_actual.png vs *_golden.png

To approve the changes:

  • Run this workflow manually and check “Update golden images (approve changes)”
  • Or locally:
    mvn -f jvm/pom.xml test -DupdateGolden=true

Last updated: Run #576

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0cf9eb64e0

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +16 to +20
auto lineHeight = common.at("lineHeight").get<double>();
auto base = common.at("base").get<double>();
auto imageSize = common.at("scaleW").get<double>();

const FontWrapper fontWrapper{name, lineHeight / size, base / size, Vec2D(imageSize, imageSize), size, distanceRange};

Choose a reason for hiding this comment

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

P2 Badge Use scaleH for vertical font atlas sizing

In FontManifestParser::parse, the atlas height is assumed to be the same as scaleW (imageSize is reused for both dimensions). For fonts whose JSON uses a non‑square atlas (scaleW != scaleH), this makes the FontWrapper size and the subsequent texture coordinate normalization use the wrong vertical scale, which will misplace or distort glyphs at render time. This should read scaleH separately and normalize t0/t1 with that height to keep glyph UVs accurate for non‑square atlases.

Useful? React with 👍 / 👎.

Comment on lines +32 to +36
// perform the load with the mutex kept _locked_.
// -> no parallel loading of different fonts
const std::string manifestUrl = baseUrl + font.name + ".json";
const std::string textureUrl = baseUrl + font.name + ".png";
return loadFontFromUrls(*dataLoader, manifestUrl, textureUrl);

Choose a reason for hiding this comment

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

P2 Badge Populate the font cache after a successful load

FontLoader::loadFont checks the cache but never inserts the newly loaded FontLoaderResult before returning. In the web build, TextLayer and other callers invoke loadFont repeatedly for the same font name, so this omission causes repeated network fetches and JSON parsing for every call, which can noticeably slow down rendering and increase bandwidth. After loadFontFromUrls succeeds, store the result in cache (e.g., keyed by font.name) so subsequent calls reuse it.

Useful? React with 👍 / 👎.

@komplexon3
Copy link
Author

I forgot to make one change: I had to rename a parameter in the logger because it was a keyword in JS. I still have to make the corresponding change for iOS and Android

@komplexon3 komplexon3 changed the title code dump from exploration repository Web MapSDK Jan 22, 2026
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.

2 participants