Repository navigation
Material Symbols (rounded) icons on Android, matching desktop - #57
Merged
Merged
Conversation
Desktop already draws Material Symbols Rounded (scripts in desktop/scripts/gen-icons.mjs). Android used androidx material-icons-extended (the older Material Icons, filled/outlined styles). scripts/gen-android-icons.mjs now generates ui/icons/HocketIcons.kt from the same Iconify dataset: the 96 glyphs the app uses, as lazy Compose ImageVectors, with filled and outlined rounded variants so the bottom bar keeps marking the selected place by fill. HocketIcons mirrors androidx's Icons layout, so call sites only swap the receiver. Path data is re-spelled with explicit separators; every Material Symbols path renders pixel-identical before and after in Chromium. Drops the material-icons-extended dependency. Closes #41 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NuB6eB6f9VjDfxTSEfsRQy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #41.
Desktop
Already on Material Symbols Rounded since 96a8d61 (
desktop/scripts/gen-icons.mjs→material-icons.ts, drawn byIcon.tsx). Re-running the generator gives a byte-identical file, and no renderer UI draws icons from unicode glyphs, so desktop needs no change here.Android
Was on
androidx.compose.material:material-icons-extended(the older Material Icons, Filled/Outlined styles).scripts/gen-android-icons.mjsgeneratesui/icons/HocketIcons.ktfrom the same Iconify dataset desktop uses (@iconify-json/material-symbols, a desktop dev dependency). It emits only the 96 glyphs the app uses, as lazily built ComposeImageVectors.HocketIconscopies androidx'sIconslayout (Filled.X,Outlined.X,AutoMirrored.Filled.X) and keeps the same names, so each call site only changesIcons.toHocketIcons.across 29 files.FavoriteBorder,StarOutline,ErrorOutline,RemoveCircleOutline) map to the symbol's outlined form. AutoMirrored icons keepautoMirror = trueso they flip in right-to-left layouts.material-icons-extendeddependency.HocketIconsTest, builds every icon (so a path the parser can't read fails in CI). It checks each is a 24dp vector, that it mirrors exactly when it's in an AutoMirrored group, and that filled and outlined Home differ.android/README.md.Path data
Iconify's SVG paths are minified (
q0-.475.213-.9). The generator rewrites them with explicit separators so Compose's parser never has to split numbers that run together. I rendered all 16,422 Material Symbols paths in Chromium before and after the rewrite: every one is pixel-identical.Not verified locally
There's no Android SDK in the environment I worked in, so I haven't compiled this or looked at it on a device; CI is the first compile. Worth a quick look on a device at:
🤖 Generated with Claude Code
https://claude.ai/code/session_01NuB6eB6f9VjDfxTSEfsRQy
Generated by Claude Code