googlefonts / nanoemoji

A wee tool to build color fonts.
Apache License 2.0
241 stars 23 forks source link

Blaka Ink SVG doesn't work in Safari #416

Closed rsheeter closed 2 years ago

rsheeter commented 2 years ago

See https://github.com/googlefonts/nanoemoji/issues/406#issuecomment-1118616973

rsheeter commented 2 years ago

@yanone to be sure I try the right thing, can you give me a link to the exact copy of Blaka Ink you were using as input to maximum_color?

rsheeter commented 2 years ago

For context, I've been using https://github.com/rsheeter/color_aboard to prep the color fonts

rsheeter commented 2 years ago

I tried the version from https://github.com/google/fonts/commit/35a8cf3bf9ae2f862abf63d18fdeadb70694fad1 in a simple html page in Safari Version 15.4 (17613.1.17.1.13) on macOS 12.3.1 and it worked:

image

Chrome and Firefox also loaded it. Font Gauntlet (on Chrome) too:

image

Maybe I did something wrong when trying to reproduce, @yanone passing to you to confirm/deny you get similar results.

yanone commented 2 years ago

I ran your onboard.py script to the same result as my previous conversion as far as Blaka Ink goes. The other fonts convert fine, only Blaka won't.

For my earlier attempt I was using the exact same font binary that you referenced in your script.

The result is not surprising to me as my software setup hasn't changed. Your script merely packages a bunch of commands together.

Here’s my Python stack. Apologies for not using a virtual environment:

absl-py                                           1.0.0
afdko                                             3.6.2
aiohttp                                           3.7.4
alpaca-trade-api                                  1.5.1
altgraph                                          0.17
aniso8601                                         9.0.1
appdirs                                           1.4.4
appnope                                           0.1.2
argon2-cffi                                       21.3.0
argon2-cffi-bindings                              21.2.0
asttokens                                         2.0.5
async-generator                                   1.10
async-timeout                                     3.0.1
attrs                                             21.4.0
autobahn                                          21.3.1
Automat                                           20.2.0
axisregistry                                      0.2.0
babelfont                                         2.0.2
backcall                                          0.2.0
bcrypt                                            3.2.0
beautifulsoup4                                    4.10.0
beziers                                           0.4.0
binance                                           0.3
bintrees                                          2.2.0
black                                             21.9b0
blackrenderer                                     0.5.0a3
blankly                                           1.16.5b0
bleach                                            4.1.0
bokeh                                             2.4.2
booleanOperations                                 0.9.0
Brotli                                            1.0.9
browserstack-local                                1.2.2
bump2version                                      1.0.1
bumpfontversion                                   0.1.0
cached-property                                   1.5.2
cachelib                                          0.4.1
cachetools                                        4.2.1
cattrs                                            1.10.0
certifi                                           2021.10.8
cffi                                              1.15.0
cffsubr                                           0.2.9.post1
cfgv                                              3.2.0
chardet                                           3.0.4
charset-normalizer                                2.0.12
click                                             8.0.3
cmarkgfm                                          0.7.0
codecov                                           2.1.11
collidoscope                                      0.4.1
colorama                                          0.4.4
colorlog                                          6.6.0
commandlines                                      0.4.1
commonmark                                        0.9.1
compreffor                                        0.5.1.post1
constantly                                        15.1.0
coverage                                          5.5
cryptography                                      3.4.7
cu2qu                                             1.6.7.post1
CurrencyConverter                                 0.15
cycler                                            0.10.0
daemon                                            1.2
dataclasses                                       0.6
dateparser                                        1.1.0
debugpy                                           1.6.0
decorator                                         5.1.1
deepdiff                                          5.3.0
defcon                                            0.10.0
defusedxml                                        0.7.1
dehinter                                          4.0.0
Deprecated                                        1.2.13
deprecation                                       2.1.0
dictdiffer                                        0.8.1
distlib                                           0.3.1
dmgbuild                                          1.4.2
docutils                                          0.17
ds-store                                          1.3.0
entrypoints                                       0.4
et-xmlfile                                        1.1.0
exchange-calendars                                3.4
executing                                         0.8.3
ez-setup                                          0.9
filelock                                          3.0.12
flake8                                            4.0.1
Flask                                             2.0.2
Flask-RESTful                                     0.3.9
Flask-Session                                     0.4.0
flask-unittest                                    0.1.2                  /Users/yanone/Code/py/git/flask-unittest
flavours                                          0.0.1
font-v                                            2.1.0
fontbakery                                        0.8.9.dev118+gea3d9bec
fontdiffenator                                    0.9.12
fontFeatures                                      1.5.0                  /Users/yanone/Code/py/git/fontFeatures
fontmake                                          3.3.0
fontMath                                          0.9.1
fontParts                                         0.10.2
fontPens                                          0.2.4
fontproduction                                    1.0                    /Users/yanone/Schriften/fontproduction.git/Lib
fonttools                                         4.33.4.dev0
freetype-py                                       2.2.0
frozendict                                        2.0.6
fs                                                2.4.15
gevent                                            21.8.0
gfdiffbrowsers                                    0.1.7
gflanguages                                       0.4.0
gftools                                           0.9.10.dev8+g45c6f6f
gitdb                                             4.0.9
GitPython                                         3.1.26
glyphsets                                         0.5.0
glyphsLib                                         6.0.5
glyphtools                                        0.8.0
google-api-core                                   1.31.3
google-api-python-client                          2.27.0
google-auth                                       1.35.0
google-auth-httplib2                              0.1.0
google-auth-oauthlib                              0.4.4
google-cloud-compute                              0.5.0
google-cloud-core                                 1.6.0
google-cloud-datastore                            1.15.3
google-cloud-ndb                                  1.10.5
google-cloud-secret-manager                       2.7.2
google-cloud-storage                              1.36.1
google-cloud-translate                            3.0.2
google-crc32c                                     1.1.2
google-resumable-media                            1.2.0
googleapis-common-protos                          1.53.0
googlemaps                                        4.5.3
greenlet                                          1.1.2
grpc-google-iam-v1                                0.12.3
grpcio                                            1.36.0
gspread                                           3.7.0
gunicorn                                          20.0.4
h11                                               0.12.0
hotmetal                                          0.1.0
httplib2                                          0.20.4
hyperglot                                         0.3.7
hyperlink                                         21.0.0
icnsutil                                          1.0.1
identify                                          2.0.0
idna                                              3.3
importlib                                         1.0.4
importlib-metadata                                4.0.1
incremental                                       21.3.0
inflection                                        0.5.1
iniconfig                                         1.1.1
install                                           1.3.5
ipykernel                                         6.10.0
ipyparallel                                       8.2.0
ipython                                           8.2.0
ipython-genutils                                  0.2.0
ipywidgets                                        7.7.0
itsdangerous                                      2.0.1
jedi                                              0.18.1
Jinja2                                            3.1.1
joblib                                            1.1.0
json-delta                                        2.0.2
jsonpickle                                        2.0.0
jsonschema                                        4.4.0
jupyter-client                                    7.1.2
jupyter-core                                      4.9.2
jupyter-qtconsole-colorschemes                    0.8.1
jupyterlab-pygments                               0.1.2
jupyterlab-widgets                                1.1.0
keyring                                           23.0.1
kiwisolver                                        1.3.1
korean-lunar-calendar                             0.2.1
libcst                                            0.3.17
lxml                                              4.8.0
mac-alias                                         2.2.0
macholib                                          1.14
Markdown                                          3.3.4
markdown2                                         2.4.0
MarkupSafe                                        2.1.1
matplotlib                                        3.4.2
matplotlib-inline                                 0.1.3
mccabe                                            0.6.1
mistune                                           0.8.4
mock                                              4.0.3
modulegraph                                       0.18
more-itertools                                    8.7.0
msgpack                                           1.0.2
multidict                                         5.2.0
multitasking                                      0.0.9
MutatorMath                                       3.0.1
mypy-extensions                                   0.4.3
nanoemoji                                         0.13.3.dev1+gbd11d65
natsort                                           7.1.1
nbclient                                          0.5.13
nbconvert                                         6.4.5
nbformat                                          5.2.0
nest-asyncio                                      1.5.4
newtulipy                                         0.4.6
ninja                                             1.10.2.3
nodeenv                                           1.5.0
notebook                                          6.4.10
numpy                                             1.22.3
oauthlib                                          3.1.0
openpyxl                                          3.0.7
openstep-plist                                    0.3.0
opentype-sanitizer                                8.2.1
opentypespec                                      1.8.4
opentypesvg                                       1.1.5
ordered-set                                       4.0.2
outcome                                           1.1.0
packaging                                         21.3
pandas                                            1.3.4
pandas-datareader                                 0.9.0
pandas-market-calendars                           3.2
pandocfilters                                     1.5.0
parso                                             0.8.3
pathspec                                          0.9.0
patsy                                             0.5.1
pep8                                              1.7.1
pexpect                                           4.8.0
pickleshare                                       0.7.5
picosvg                                           0.20.1
Pillow                                            9.0.1
pip                                               22.0.4
pip-api                                           0.0.27
pipdeptree                                        2.0.0
pkginfo                                           1.7.0
platformdirs                                      2.4.0
pluggy                                            1.0.0
pngquant-cli                                      2.17.0.post5
pre-commit                                        2.11.0
prometheus-client                                 0.13.1
prompt-toolkit                                    3.0.28
proto-plus                                        1.14.2
protobuf                                          3.19.4
psautohint                                        2.3.0
psutil                                            5.9.0
ptyprocess                                        0.7.0
pure-eval                                         0.2.2
py                                                1.10.0
py2app                                            0.23
py3cw                                             0.0.22
pyasn1                                            0.4.8
pyasn1-modules                                    0.2.8
pybind11                                          2.9.2
pybrowserstack-screenshots                        0.1
pycairo                                           1.20.0
pyclipper                                         1.3.0.post2
pycodestyle                                       2.8.0
pycparser                                         2.21
pyflakes                                          2.4.0
pygit2                                            1.8.0
PyGithub                                          1.55
Pygments                                          2.11.2
PyJWT                                             2.3.0
pyluach                                           1.3.0
pymemcache                                        3.4.0
PyMuPDF                                           1.19.4
PyNaCl                                            1.5.0
pyobjc-core                                       7.1
pyobjc-framework-Accounts                         7.1
pyobjc-framework-AddressBook                      7.1
pyobjc-framework-AdSupport                        7.1
pyobjc-framework-AppleScriptKit                   7.1
pyobjc-framework-AppleScriptObjC                  7.1
pyobjc-framework-ApplicationServices              7.1
pyobjc-framework-AuthenticationServices           7.1
pyobjc-framework-AutomaticAssessmentConfiguration 7.1
pyobjc-framework-Automator                        7.1
pyobjc-framework-AVFoundation                     7.1
pyobjc-framework-AVKit                            7.1
pyobjc-framework-BusinessChat                     7.1
pyobjc-framework-CalendarStore                    7.1
pyobjc-framework-CFNetwork                        7.1
pyobjc-framework-CloudKit                         7.1
pyobjc-framework-Cocoa                            7.1
pyobjc-framework-Collaboration                    7.1
pyobjc-framework-ColorSync                        7.1
pyobjc-framework-Contacts                         7.1
pyobjc-framework-ContactsUI                       7.1
pyobjc-framework-CoreAudio                        7.1
pyobjc-framework-CoreAudioKit                     7.1
pyobjc-framework-CoreBluetooth                    7.1
pyobjc-framework-CoreData                         7.1
pyobjc-framework-CoreHaptics                      7.1
pyobjc-framework-CoreLocation                     7.1
pyobjc-framework-CoreMedia                        7.1
pyobjc-framework-CoreMediaIO                      7.1
pyobjc-framework-CoreMIDI                         7.1
pyobjc-framework-CoreML                           7.1
pyobjc-framework-CoreMotion                       7.1
pyobjc-framework-CoreServices                     7.1
pyobjc-framework-CoreSpotlight                    7.1
pyobjc-framework-CoreText                         7.1
pyobjc-framework-CoreWLAN                         7.1
pyobjc-framework-CryptoTokenKit                   7.1
pyobjc-framework-DeviceCheck                      7.1
pyobjc-framework-DictionaryServices               7.1
pyobjc-framework-DiscRecording                    7.1
pyobjc-framework-DiscRecordingUI                  7.1
pyobjc-framework-DiskArbitration                  7.1
pyobjc-framework-DVDPlayback                      7.1
pyobjc-framework-EventKit                         7.1
pyobjc-framework-ExceptionHandling                7.1
pyobjc-framework-ExecutionPolicy                  7.1
pyobjc-framework-ExternalAccessory                7.1
pyobjc-framework-FileProvider                     7.1
pyobjc-framework-FileProviderUI                   7.1
pyobjc-framework-FinderSync                       7.1
pyobjc-framework-FSEvents                         7.1
pyobjc-framework-GameCenter                       7.1
pyobjc-framework-GameController                   7.1
pyobjc-framework-GameKit                          7.1
pyobjc-framework-GameplayKit                      7.1
pyobjc-framework-ImageCaptureCore                 7.1
pyobjc-framework-IMServicePlugIn                  7.1
pyobjc-framework-InputMethodKit                   7.1
pyobjc-framework-InstallerPlugins                 7.1
pyobjc-framework-InstantMessage                   7.1
pyobjc-framework-Intents                          7.1
pyobjc-framework-IOSurface                        7.1
pyobjc-framework-iTunesLibrary                    7.1
pyobjc-framework-LatentSemanticMapping            7.1
pyobjc-framework-LaunchServices                   7.1
pyobjc-framework-libdispatch                      7.1
pyobjc-framework-LinkPresentation                 7.1
pyobjc-framework-LocalAuthentication              7.1
pyobjc-framework-MapKit                           7.1
pyobjc-framework-MediaAccessibility               7.1
pyobjc-framework-MediaLibrary                     7.1
pyobjc-framework-MediaPlayer                      7.1
pyobjc-framework-MediaToolbox                     7.1
pyobjc-framework-Metal                            7.1
pyobjc-framework-MetalKit                         7.1
pyobjc-framework-MetalPerformanceShaders          7.1
pyobjc-framework-ModelIO                          7.1
pyobjc-framework-MultipeerConnectivity            7.1
pyobjc-framework-NaturalLanguage                  7.1
pyobjc-framework-NetFS                            7.1
pyobjc-framework-Network                          7.1
pyobjc-framework-NetworkExtension                 7.1
pyobjc-framework-NotificationCenter               7.1
pyobjc-framework-OpenDirectory                    7.1
pyobjc-framework-OSAKit                           7.1
pyobjc-framework-OSLog                            7.1
pyobjc-framework-PencilKit                        7.1
pyobjc-framework-Photos                           7.1
pyobjc-framework-PhotosUI                         7.1
pyobjc-framework-PreferencePanes                  7.1
pyobjc-framework-PushKit                          7.1
pyobjc-framework-Quartz                           7.1
pyobjc-framework-QuickLookThumbnailing            7.1
pyobjc-framework-SafariServices                   7.1
pyobjc-framework-SceneKit                         7.1
pyobjc-framework-ScreenSaver                      7.1
pyobjc-framework-ScriptingBridge                  7.1
pyobjc-framework-SearchKit                        7.1
pyobjc-framework-Security                         7.1
pyobjc-framework-SecurityFoundation               7.1
pyobjc-framework-SecurityInterface                7.1
pyobjc-framework-ServiceManagement                7.1
pyobjc-framework-Social                           7.1
pyobjc-framework-SoundAnalysis                    7.1
pyobjc-framework-Speech                           7.1
pyobjc-framework-SpriteKit                        7.1
pyobjc-framework-StoreKit                         7.1
pyobjc-framework-SyncServices                     7.1
pyobjc-framework-SystemConfiguration              7.1
pyobjc-framework-SystemExtensions                 7.1
pyobjc-framework-UserNotifications                7.1
pyobjc-framework-VideoSubscriberAccount           7.1
pyobjc-framework-VideoToolbox                     7.1
pyobjc-framework-Vision                           7.1
pyobjc-framework-WebKit                           7.1
pyOpenSSL                                         20.0.1
pyparsing                                         3.0.7
PyPDF2                                            1.26.0
pyperclip                                         1.8.2
PyQt5                                             5.15.6
PyQt5-Qt5                                         5.15.2
PyQt5-sip                                         12.9.1
pyrsistent                                        0.18.1
pystray                                           0.17.2
pytest                                            6.2.5
pytest-mock                                       3.6.1
python-binance                                    1.0.15
python-dateutil                                   2.8.2
python-magic                                      0.4.24
pytz                                              2022.1
pytz-deprecation-shim                             0.1.0.post0
PyYAML                                            6.0
pyzmq                                             22.3.0
qtconsole                                         5.3.0
QtPy                                              2.0.1
readme-renderer                                   29.0
redis                                             3.5.3
regex                                             2021.10.23
requests                                          2.27.1
requests-oauthlib                                 1.3.0
requests-toolbelt                                 0.9.1
resvg-cli                                         0.22.0.post3
rfc3986                                           1.4.0
rich                                              11.1.0
rsa                                               4.7.2
rstr                                              3.0.0
ruamel.yaml                                       0.15.100
ruamel.yaml.clib                                  0.2.2
scikit-learn                                      1.0.1
scipy                                             1.7.1
selenium                                          4.1.0
semver                                            2.13.0
Send2Trash                                        1.8.0
service-identity                                  21.1.0
setuptools                                        62.1.0
simplejson                                        3.17.6
six                                               1.16.0
skia-pathops                                      0.7.2
skia-python                                       87.4
smmap                                             5.0.0
sniffio                                           1.2.0
sortedcontainers                                  2.4.0
soupsieve                                         2.3.1
sre-yield                                         1.2
stack-data                                        0.2.0
statmake                                          0.4.1
statsmodels                                       0.12.2
strictyaml                                        1.6.1
stringbrewer                                      0.0.1
stripe                                            2.61.0
tabulate                                          0.8.9
terminado                                         0.13.3
testpath                                          0.6.0
threadpoolctl                                     3.0.0
toml                                              0.10.2
tomli                                             1.2.1
toolz                                             0.11.1
tornado                                           6.1
tox                                               3.22.0
tqdm                                              4.60.0
tradingview-ta                                    3.2.9
traitlets                                         5.1.1
trio                                              0.19.0
trio-websocket                                    0.9.2
ttfautohint-py                                    0.5.0
twine                                             3.4.1
Twisted                                           21.2.0
txaio                                             21.2.1
typed-ast                                         1.4.2
typeworld                                         1.0.3.post3
typing-extensions                                 3.10.0.2
typing-inspect                                    0.6.0
tzdata                                            2021.5
tzlocal                                           4.1
ufo2ft                                            2.27.1.dev2+g15f14d3
ufoLib2                                           0.13.1
ufolint                                           1.2.0
ufonormalizer                                     0.5.3
ufoProcessor                                      1.9.0
uharfbuzz                                         0.25.0
ujson                                             4.2.0
unicodedata2                                      14.0.0
Unidecode                                         1.3.2
uritemplate                                       3.0.1
urllib3                                           1.26.8
vharfbuzz                                         0.1.1
virtualenv                                        20.4.2
vttLib                                            0.11.0
watchdog                                          2.1.6
wcwidth                                           0.2.5
webappengine                                      0.1.0
webencodings                                      0.5.1
websocket-client                                  1.2.1
websockets                                        9.1
Werkzeug                                          2.0.2
wheel                                             0.36.2
widgetsnbextension                                3.6.0
wrapt                                             1.13.3
wsproto                                           1.0.0
wxPython                                          4.1.1
xlrd                                              2.0.1
xmldiff                                           2.4
yarl                                              1.7.0
yfinance                                          0.1.59
zipp                                              3.4.1
zope.event                                        4.5.0
zope.interface                                    5.4.0
zopfli                                            0.2.1
rsheeter commented 2 years ago

Curious, it's working in Safari for me at the end. What version of macOS and Safari are you on? - if it's older you could be running into it's old very restrictive limits (https://github.com/googlefonts/nanoemoji/issues?q=is%3Aissue+is%3Aopen+label%3A%22svg+compat%22).

I would suggest:

  1. Confirm/deny you have an up to date Safari, if not it could be some glyphs hit the old limits
  2. Try with a clean venv with as little as possible installed, just to see if somehow the large set of stuff installed makes a difference. I doubt it but it's worth checking.
  3. Proceed with the copy I pushed given that it shows at least some evidence of working in Safari
yanone commented 2 years ago

I updated my Safari to 15.4. I’m on macOS 10.15.7. Same rendering both in Safari as well as the Finder preview.

I regenerated the font with a clean venv as you asked, now my setup is this:

absl-py==1.0.0
appdirs==1.4.4
attrs==21.4.0
booleanOperations==0.9.0
cffsubr==0.2.9.post1
cu2qu==1.6.7.post1
fonttools==4.33.3
fs==2.4.16
lxml==4.8.0
nanoemoji==0.13.2
ninja==1.10.2.3
picosvg==0.20.2
Pillow==9.1.0
pngquant-cli==2.17.0.post5
pyclipper==1.3.0.post2
regex==2022.4.24
resvg-cli==0.22.0.post3
six==1.16.0
skia-pathops==0.7.2
toml==0.10.2
ufo2ft==2.27.0
ufoLib2==0.13.1
zopfli==0.2.1

So I must indeed conclude that my Safari or macOS is too old. Thing is I’ll be off work for three month end of this month, and I'm not going to update my system now before the end of the month.

Heads up: So the fonts that are coming in via my onboarding will therefore not be maximized and you will need to repeat that as a final step yourself. They will overwrite the existing color fonts that you put in google/fonts, and you would overwrite them one last time with your authoritative maximized fonts, this time just replacing the binary and not the metadata.

I'm doing this because I don't know at which point in time you took those fonts and maximized them, as work was still in progress and changes were still being made.

Otherwise this issue is solved, I think

rsheeter commented 2 years ago

I think it would still be OK for you to run maximum_color during onboarding then? - you won't be able to verify it but that's ok, it's just going to dev and it's more helpful than simply not doing it.

rsheeter commented 2 years ago

Since there is no obvious work to do on nanoemoji at this point I'm closing this.