mapbox / mapbox/mapbox-navigation-android

Use system font in road shields

Open
#5,326 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

jira-sync-complete UI
Dominant language
Kotlin
Stars
651
Forks
321
PR merge metrics
No merged PRs in 30d

Description

When appending a shield text to a shield background SVG we're currently hardcoding Arial and Helvetica fonts to be used.

While we might consider opening up the font value for customization, we should probably also use a font that is definitely available on the device (default system font?) instead of hardcoding one.

cc @abhishek1508

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in libnavui-shield/src/main/java/com/mapbox/navigation/ui/shield/ShieldsCache.kt around line 179, where shield text font names are selected. Check how the background SVG and appended text are assembled, then confirm the resulting shield text uses an Android system-available font rather than the hardcoded Arial or Helvetica names.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
mobile
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.