Add openharmony open source icons
OpenHarmony is an open-source project incubated and operated by the OpenAtom Foundation, with its derivative system HarmonyOS having an ecosystem device count exceeding 80 million.
OpenHarmony itself is currently open-sourced on gitcode.com, but it provides a repository mirror on GitHub, it comes built-in with a complete set of icon libraries, can we regularly pull icons from its icon storage repository and sync them to Iconify?
I have found the repository address where the icons are stored: https://github.com/openharmony/global_system_resources/blob/master/fonts/HMSymbolVF.ttf
Additionally, if you want to quickly view the contents of this .ttf file, here is an open-source contributor who has copied and displayed it on GitHub Pages: https://erbws.github.io/hm-symbol, and its repository address is located at: https://github.com/ErBWs/hm-symbol
Iconify does not add/remove icons, it is done at repositories for icon sets.
To add an icon, you need to:
- Select an icon set you think it belongs to (or multiple sets)
- Click link for author of that icon set. It will bring you to repository with icons.
- Open an issue at that repository.
So can I add the OpenHarmony icon set to Iconify? 🤔 Its official repository doesn't provide icons in .svg format, but there's a .ttf font file containing all the OpenHarmony icons. How can I add this to iconify?
Honestly, I'm a bit confused because I don't understand how this repository pulls icon sets from other repositories and generates JSON files. 🤔
Oh, I've misread original post. It is about an icon set, not icon. Sorry.
I don't see any SVG files, only font. Fonts are not usable.
Can I create a repository myself, use the OpenHarmony repository as a submodule, and update it periodically (convert it to SVG)?
Converting from font to SVG always results in bad quality icons.
So it can be added only if there are original SVG files that font was created from and they are actually good. From my experience, if icons were designed to be used in font, they are almost always badly designed without logical grid and padding.
Regardless of that, there is another issue. I've checked license of that font, it is a custom license, not open source. Only icon sets with valid open source licenses are accepted. Custom licenses are not allowed.
Regarding the issue of converting fonts to SVG, I'm really not very familiar with it. I don't seem to see any major issues with the display on the GitHub Pages website. (For example, see https://erbws.github.io/hm-symbol)
I checked the license-related information; its repository is under the Apache License(see https://github.com/openharmony/global_system_resources/blob/master/LICENSE), so it should be possible to add it to Iconify, right?
No, I was wrong. It seems it is indeed directly introducing this custom font to display on the web page (using @font-face), but Iconify uses SVG. I understand the differences between them now. It seems I still need to think further about a solution.
That license file is for repository, fonts have different license: https://github.com/openharmony/global_system_resources/blob/master/LICENSE_Fonts
Since there are no SVG files with a different license, converting from font would apply font's license.
Got it, it really can’t be resolved for now 😭. I’m planning to ask the upstream repository about it, so this issue will have to be put on hold for the time being.
As for SVG and font, even though both are technically vectors, there is one major difference: icon's viewBox.
In SVG it is fixed, so icon is scaled logically like image.
In fonts glyphs are not rendered like that, they don't have fixed viewBox and instead have attributes that tell how much offset should be added to render next character. Technically it is even more complex than that. That results in vectors that do not have a fixed viewBox, if one is applied, some parts of character can end up being outside of it. That means converting from font to SVG can result in icons with inconsistent padding, alignment, shapes outside of viewBox... so basically very bad unusable SVGs.
In early days of Iconify project, when icon fonts were still popular and there weren't many decent SVG sets, I did try to import SVGs from icon fonts. It was a mess. Since then I haven't seen a single successful conversion of font to SVGs. If icons are designed to be used as fonts, they are always bad.