win32ss / supermium

Chromium fork for Windows XP/2003 and up
https://win32subsystem.live/supermium/
BSD 3-Clause "New" or "Revised" License
2.38k stars 80 forks source link

How to replace Noto Emoji font with alternative emoji font (e.g. Applemoji)? #812

Open Darthagnon opened 2 months ago

Darthagnon commented 2 months ago

I would like to use the Apple Emoji font in the browser, instead of the Noto Emoji font. I expect the Apple and Segoe Emoji fonts probably have licensing restrictions and cannot be used officially, but is there some sort way I could manually put an emoji font of my choice for use?

Many thanks!

XakerTwo commented 2 months ago

HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes Probably not what you are looking for and it's a system-wide way, that i personaly use to force monospace font in my system. But i don't know how to deal in your situation cuz you need to substitute not whole font family. Looking keys around (there some other Fonts related) and maybe you find something interesting

Also you may be interested in something like forge of font, but first make a backup of original system fonts (7z able to open "customized" folders in "raw" form)

win32ss commented 2 months ago

I would've used Segoe UI Emoji if it were redistributable. If Selawik (redistributable clone of Segoe UI) Emoji is developed, I would also consider using it.

However, the registry key above does not seem to have an effect on the fonts used on web pages. The web pages are seeking fonts by their "internal names", and Segoe UI Emoji is the most popular among emoji fonts, which is why the Noto Emoji supplied with Supermium is named "Segoe UI Emoji" internally.

I have been using FontForge to modify fonts, but it doesn't recognize various tables used by fonts, including the COLR tables used by colour emoji fonts. As a result, if I export a modified font in such a tool, these tables will be missing from the resulting font, which results in a loss of colour information.

As a result, for Noto Color Emoji, I had to modify the internal name in a hex editor. In that case, it should be the instance of the font name immediately above a copyright string (but it's not zero-terminated!).

XakerTwo commented 2 months ago

when i inspected files briefly, i noticed that there several places where name is defined, so i dropped similar idea and not looked them precisely. As for non-zero-terminated - it often means that size of string is defined somewhere near , mostly in LE. But in case of target name is shorter than original the abuse of terminating may work correctly. in vice-versa case ... you will deal with offsets, many of them, so choose a source font with same or longer name :D

And about registry key - not sure that browser check fonts files on its own. rather it ask OS for some info, and in near key there a list of registered fonts in key-value form where key is a font name and value is a file name.

As for the FontForge - did not used it a lot, just opened, looked, played a bit and closed. But can it be used to open not colored font, change necessary properties and then compare with original file to see what and how are changed? Do with small and simple then use on complex - pretty effective way

EDSln commented 2 months ago

I have not been able to install Apple Emoji, when installing or opening it gives an error file is not a font. But I replaced the emoji by removing the Noto Emoji font and installing TwemojiMozilla from Firefox.
not naming

Darthagnon commented 1 week ago

I found a version of Apple Emoji for Windows, but am uncertain how to actually use it. The Readme suggests it requires a minimum of Win10 Anniversary / 1607 to work.

EDSln commented 1 week ago

I found a version of Apple Emoji for Windows, but am uncertain how to actually use it. The Readme suggests it requires a minimum of Win10 Anniversary / 1607 to work.

This font does not work even in Windows 11 24H2. It cannot be opened or installed. Безымянный