-
-
Notifications
You must be signed in to change notification settings - Fork 285
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
Autogenerated icons? #395
Comments
this sounds actually kinda possible with some imagemagick trickery. |
That sounds really futuristic and interesting. There's actually a TTF already of the Arcticons font with decent kerning. |
For example, the first app I choose to make an icon myself for was "Taimi". I choose it because the icon is just the text "Taimi", about as trivial as it gets. What I did was copy and paste each letter from the svg of letters and tried to center them with decent kerning. Instead of doing this manually, an algorithm would see that an app called "abc xyz" is installed, but not covered by the icon pack. It grabs the needed letters (perhaps from the ttf to handle the kerning automatically as opposed to adjusting it until "meh, that looks decent"). Spaces could become newlines to help formatting and the algorithm should try to pick the best size to leave good-looking margins on the icon. As a fallback (in the case that the name contains characters not covered by the font, etc.) the original unthemed icon could be used. Some names will require weird formatting to fit, but I think that generally, an oddly formatted icon that matches the icon pack looks nicer than an out-of-place "normal" icon. I know that Nova Launcher allows icon packs to autogenerate icons, but I don't know how it works. There are probably many hundreds of popular apps with icons that are just the name of the app (not very creative imo). |
This is kinda a separate thing, but I don't know if it warrants its own issue. The readme section on icon requests could use an update since there is now an icon request feature builtin to the app (it still says there isn't) and explain what kind of icons should (or shouldn't) be requested, and perhaps suggest that if one would like an icon added they could try doing it themselves (it is fun to make icons 😄). |
i think there shouldn't be any restriction on what icons can be requested because it is upto devs to either cover it or not pull request should be appreciated. @dgcampbe |
@dgcampbe Yup, gonna do that later :)
Sounds like a lot of work, but if anyone is willing to give it a try, I'm not against it ;)
@mubashir-rehman fun fact, for me, there are actually some apps that I won't cover with Arcticons. But it that only goes for apps that promote hate-speech like Gab or Parler. Other than that, there are for example a few icons for certain nsfw-apps in here. |
Yeah, Gab and Parlor can f--- off! 🤮 |
I think an easier solution would be to just give all the missing icons a standard letter as icon instead of the full name. |
Two letters would be great. If it has one word name than first two letters(first capital and second small). if it has two ore more words in name than first letter of each word(all capital). |
if it has more than for words than can(only first and last words will be used) |
I think auto generate line icons from the real icon can also bei nice. (Edge detection) https://stackoverflow.com/questions/5827809/canny-edge-detection-using-processing |
Interesting stuff! |
@Donnnno |
I made a python script that turns the name of an icon into an SVG file containing the paths for the letters in the name using the Arcticons Font TTF file. It is far from perfect, but it might be a start on a script we could use to quickly produce icons without having to manually grab and space letters. """Turn an app name into an svg"""
from fontTools.ttLib import TTFont
from fontTools.pens.svgPathPen import SVGPathPen
app_name = input("Please input the name of the app: ")
font = TTFont("Arcticons-Regular.ttf")
os2 = font["OS/2"]
hmtx = font["hmtx"]
glyphset = font.getGlyphSet()
glyphorder = font.getGlyphOrder()
width = "48"
height = "48"
svg = f"""
<?xml version="1.0" standalone="no"?>
<svg viewBox="0 0 {width} {height}" xmlns="http://www.w3.org/2000/svg" version="1.1">
"""
start_x = 0
for char in app_name:
if char not in [" ", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]:
glyph = glyphset[char]
pen = SVGPathPen(glyphset)
glyph.draw(pen)
lsb = "1"
svg += f"""
<g transform="matrix(0.01 0 0 -0.01 {str(start_x)} 0)">
<path fill="none" stroke="black" stroke-width="1" stroke-linecap="round"
d="{pen.getCommands()}" />
</g>
"""
start_x += 5
svg +="""
</svg>
"""
with open(f'{app_name}.svg', "w") as fp:
fp.write(svg) |
Just to throw in my 2 cents and give a different view about covering missing icons with placeholders or auto generated (font) icons. I had a couple of apps installed which weren't covered by arcticons. If all those icons would've had a placeholder which is somewhat acceptable, I wouldn't have started designing icons for this pack (currently none of them are included but my point is still valid). If those auto generated icons aren't acceptable, they shouldn't be in the icon pack in the first place. This means, the incentive to design a new icon is the lower the lower the additional benefit of it is. If you can create acceptable auto generated icons, it should be an additional icon pack. Usually you can combine multiple icon packs in a launcher. People who are interested in it can install the auto generated icon pack and others still have the incentive to design new icons. |
Good point. Having a script to make icons might still be useful to us since there are many icons that are simply letters. Instead of a human having to fiddle with copying letters by hand and getting the spacing right (and still probably not have pixel perfection), a script could do it and always have good kerning and allignment. |
No description provided. |
Looks cool! |
I can't preview it, but the real challenge would also be to make it work without adding all the combinations to the pack. like @basings said, maybe something like that fits better in a complimentary icon pack. |
Also, and this is an issue from my side, the font weight has to match the Arcticons stroke weight, right now they're different. I've tought on how to change that accordingly, the font file right now was kinda an experiment. The cool solution would be to use the svg file somehow and place it at the good spaces. |
I started a small application that creates a complementary icon pack with the edge detection algorithm discussed above. It's not great right now, but it does the trick. |
Hey @kaanelloed ! Wow, this is actually super interesting how you managed to make it work. |
Thanks ! I'll try to add other type of generated icons, like letters with Arcticons font/SVG. |
It's still experimental, but you can try the lastest release |
I am really excited to have a script to automatically place letters with proper spacing to make icons. |
Wow, the new options are cool! Amazing work |
How do you activate this? I just installed Arcticons Light from Play Store, but didn't see an option to enable automatic generation. |
Think this might be useful. https://stackoverflow.com/questions/49133484/how-to-convert-edged-image-in-opencv-to-svg-file |
It's not in the Arcticons app, it's in a separate app. |
Moving this discussion to #1448 |
I think that a great feature to implement in the future would be that icons that aren't covered by the icon pack could be autogenerated. Instead trying to to convert the app's icon into lines, we could just have an algorithm that takes the name of the app and uses the font to automatically produce an icon with the Apple name. They might not be perfect looking, but having a random "normal" icon in the middle of all the beautiful icons is annoying. This would also be super helpful for creating icons of apps that just have their name on their icon. The algorithm could handle the kerning, etc. for us. I am guessing we might want a true font file instead of an svg of letters to do this.
The text was updated successfully, but these errors were encountered: