I hereby claim:
- I am chrissimpkins on github.
- I am csimpkins (https://keybase.io/csimpkins) on keybase.
- I have a public key ASDA5NOeS_OGJGEyRFv4MHc6LYKMtHmvKznuaHzryrdBxQo
To claim this, I am signing this object:
| ''' | |
| Requires pyicu, fontTools | |
| Authors: | |
| Denis Moyogo Jacquerye [https://github.com/moyogo] | |
| MIT License [https://opensource.org/licenses/MIT] | |
| ''' | |
| import sys | |
| import icu |
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/env python3 | |
| # --------------------------------------------------------------------------- | |
| # Copyright 2019 Christopher Simpkins | |
| # Apache License, v2.0 | |
| # | |
| # Portions of this source file are derived from the | |
| # | |
| # `com.google.fonts/check/points_out_of_bounds` | |
| # |
| tt = TTFont(fontpath) | |
| cmap = tt.getBestCmap() | |
| # now the integers are keys in the cmap object and can be used to compare against hexadecimal values for presence in a font | |
| test_list = (hex1, hex2, hex3,...) | |
| # how to split hex ranges to individual hex codes | |
| # e.g., 0x0020-0x0028 | |
| for x in range(0x0020,0x0028): |
| # define project name | |
| PROJECT=replaceme-with-project-name | |
| # define path to the font build directory for tests | |
| FONT_DIR="/path/to/font/file/directory" | |
| venv: | |
| python3 -m venv ~/venv/$(PROJECT) | |
| # can't activate and deactivate from Makefile | |
| # because it runs new subshells for each |
| # Copyright 2019 Google LLC. All Rights Reserved. | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| #!/bin/bash | |
| # Copyright 2018 Source Foundry Authors | |
| # MIT License | |
| # compare fonts with ttx | |
| ttdiff () { | |
| if [ "$#" -lt 2 ] | |
| then | |
| echo "Usage: ttdiff FONT1.ttf FONT2.ttf [tables ...]" |
| # snip: https://github.com/fonttools/fonttools/blob/51a49de3eda4c10df29ceba85a90e7d7378137e8/Lib/fontTools/varLib/mutator.py#L303-L310 | |
| if glyf: | |
| for glyph in glyf.glyphs.values(): | |
| if hasattr(glyph, "program"): | |
| instructions = glyph.program.getAssembly() | |
| # If GETVARIATION opcode is used in bytecode of any glyph add IDEF | |
| addidef = any(op.startswith("GETVARIATION") for op in instructions) | |
| if addidef: | |
| break |
| pyftsubset FONTPATH.ttf unicodes=U+XXXX-U+XXXX --name-ids=3,4,6 --no-ignore-missing-unicodes --hinting --verbose --output-file=OUT_FONTPATH.ttf | |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <array> | |
| <dict> | |
| <key>name</key> | |
| <string>Incompatible Master</string> | |
| <key>predicate</key> | |
| <string>mastersCompatible == 0</string> | |
| </dict> |