mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 00:52:16 -06:00
failed attempt at upgrading scp
This commit is contained in:
parent
ac6c4b13f5
commit
d70b885722
|
@ -4,13 +4,13 @@ ENV ver_asmcrypto=5b994303a9d3e27e0915f72a10b6c2c51535a4dc \
|
|||
ver_hashwasm=4.9.0 \
|
||||
ver_marked=4.0.12 \
|
||||
ver_mde=2.16.1 \
|
||||
ver_codemirror=5.65.1 \
|
||||
ver_codemirror=5.65.2 \
|
||||
ver_fontawesome=5.13.0 \
|
||||
ver_zopfli=1.0.3
|
||||
|
||||
|
||||
# download;
|
||||
# the scp url is latin from https://fonts.googleapis.com/css2?family=Source+Code+Pro&display=swap
|
||||
# the scp url is regular latin from https://fonts.googleapis.com/css2?family=Source+Code+Pro&display=swap
|
||||
RUN mkdir -p /z/dist/no-pk \
|
||||
&& wget https://fonts.gstatic.com/s/sourcecodepro/v11/HI_SiYsKILxRpg3hIP6sJ7fM7PqlPevW.woff2 -O scp.woff2 \
|
||||
&& apk add cmake make g++ git bash npm patch wget tar pigz brotli gzip unzip python3 python3-dev brotli py3-brotli \
|
||||
|
@ -118,6 +118,7 @@ RUN cd easy-markdown-editor-$ver_mde \
|
|||
# build fontawesome and scp
|
||||
COPY mini-fa.sh /z
|
||||
COPY mini-fa.css /z
|
||||
COPY shiftbase.py /z
|
||||
RUN /bin/ash /z/mini-fa.sh
|
||||
|
||||
|
||||
|
|
|
@ -29,3 +29,10 @@ pyftsubset "$orig_woff" --unicodes-file=/z/icon.list --no-ignore-missing-unicode
|
|||
|
||||
# scp is easier, just want basic latin
|
||||
pyftsubset /z/scp.woff2 --unicodes="20-7e,ab,b7,bb,2022" --no-ignore-missing-unicodes --flavor=woff2 --output-file=/z/dist/no-pk/scp.woff2 --verbose
|
||||
|
||||
exit 0
|
||||
|
||||
# kinda works but ruins hinting on windows, just use the old version of the font which has correct baseline
|
||||
python3 shiftbase.py /z/dist/no-pk/scp.woff2
|
||||
cd /z/dist/no-pk/
|
||||
mv scp.woff2.woff2 scp.woff2
|
||||
|
|
27
scripts/deps-docker/shiftbase.py
Executable file
27
scripts/deps-docker/shiftbase.py
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
from fontTools.ttLib import TTFont, newTable
|
||||
|
||||
|
||||
def main():
|
||||
woff = sys.argv[1]
|
||||
font = TTFont(woff)
|
||||
print(repr(font["hhea"].__dict__))
|
||||
print(repr(font["OS/2"].__dict__))
|
||||
# font["hhea"].ascent = round(base_asc * mul)
|
||||
# font["hhea"].descent = round(base_desc * mul)
|
||||
# font["OS/2"].usWinAscent = round(base_asc * mul)
|
||||
font["OS/2"].usWinDescent = round(font["OS/2"].usWinDescent * 1.1)
|
||||
font["OS/2"].sTypoDescender = round(font["OS/2"].sTypoDescender * 1.1)
|
||||
|
||||
try:
|
||||
del font["post"].mapping["Delta#1"]
|
||||
except:
|
||||
pass
|
||||
|
||||
font.save(woff + ".woff2")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
Loading…
Reference in a new issue