Skip to content
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

Impossible to search in material icons #5225

Closed
boubou158 opened this issue Apr 3, 2023 · 6 comments
Closed

Impossible to search in material icons #5225

boubou158 opened this issue Apr 3, 2023 · 6 comments

Comments

@boubou158
Copy link

Hi,

I am trying to remove some icons I do not use in my project from the Material Icons font and regenerate it.
It is not working, i can't search anything on the file. Trying to search for a code point found on https://fonts.google.com/icons?icon.query=information for instance do not work. Neither trying to search "information" directly.

How can i do to remove the unused icons from this font?

Thank you

@adbac
Copy link

adbac commented Apr 5, 2023

Hi,

How have you exactly searched for the codepoint? Writing "e88e" in the dialog doesn't work, you need to write "unie88e". It works for me.
If you want to have a clean view of all the icons, go to the Encoding menu and then click Compact, it makes it easier to select and clear the glyphs you don't need.

I hope this will help you

@boubou158
Copy link
Author

Thanks a lot @adbac , this was exactly what I was looking for!
Do you mind telling me how once I remove the glyphs, how to "condense the font" as described in this article in Remove unused selectors from the font file part: https://www.shedloadofcode.com/blog/reduce-material-design-icons-font-to-7kb-and-automate-with-pyautogui

@adbac
Copy link

adbac commented Apr 6, 2023

Are you referring to this quote ?

If this is the case, I think the author of the article meant "Compact", as I explained it in the previous comment:

If you want to have a clean view of all the icons, go to the Encoding menu and then click Compact, it makes it easier to select and clear the glyphs you don't need.

@boubou158
Copy link
Author

Hi @adbac ,

Whatever i try (using the woff2 or the ttf), when I compact then select some specific unicodes, invert the selection, then detach and remove glyphs and generate fonts, i cant access the icons anymore. I have this warning in fontforge:
Lookup subtable contains unused glyph X making the whole subtable invalid

Then the icons are not displayed anymore on a test index.html trying to display some material icons.

Do you have any suggestions?

Thank you

@adbac
Copy link

adbac commented Apr 17, 2023

Hello, I tried to delete the subtable causing the issue and it still doesn't work... I won't be able to help you on that point, sorry

@boubou158
Copy link
Author

@adbac In case of it is useful for someone, i found the solution. After compacting, only icons glyph should be detached and removed. All the other characters should stay (beginning of the font with A to Z characters and as well the last three caracters after the icons). When those characters are not removed, font is working fine.

@jtanx jtanx closed this as completed Apr 27, 2023
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

No branches or pull requests

3 participants