mirror of
https://github.com/slavfox/Cozette.git
synced 2024-10-26 09:18:33 +03:00
v.1.19.2-hidpi2 HiDpi fixes
This commit is contained in:
parent
112add28d5
commit
59f5477266
6
.github/workflows/main.yml
vendored
6
.github/workflows/main.yml
vendored
@ -27,9 +27,13 @@ jobs:
|
|||||||
- name: Build fonts
|
- name: Build fonts
|
||||||
run: |
|
run: |
|
||||||
pipenv --python /bin/python install; pipenv run python build.py fonts
|
pipenv --python /bin/python install; pipenv run python build.py fonts
|
||||||
|
- name: Save version
|
||||||
|
id: version
|
||||||
|
run: |
|
||||||
|
echo "version=${GITHUB_REF#refs/tags/}" | tr . - >> $GITHUB_OUTPUT
|
||||||
- name: Zip fonts
|
- name: Zip fonts
|
||||||
run: |
|
run: |
|
||||||
mv build CozetteFonts; cp ./LICENSE CozetteFonts/LICENSE; zip -r CozetteFonts.zip CozetteFonts
|
mv build CozetteFonts; cp ./LICENSE CozetteFonts/LICENSE; zip -r CozetteFonts-${{ steps.version.outputs.version }}.zip CozetteFonts
|
||||||
- uses: ncipollo/release-action@v1
|
- uses: ncipollo/release-action@v1
|
||||||
with:
|
with:
|
||||||
artifacts: "CozetteFonts.zip,CozetteFonts/*"
|
artifacts: "CozetteFonts.zip,CozetteFonts/*"
|
||||||
|
10
CHANGELOG.md
10
CHANGELOG.md
@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog], and this project adheres to
|
The format is based on [Keep a Changelog], and this project adheres to
|
||||||
[Semantic Versioning].
|
[Semantic Versioning].
|
||||||
|
|
||||||
|
## [1.19.2-hidpi2]
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- TTF fonts now build from the fontforge sfd sources
|
||||||
|
- Fixed rendering of hidpi fonts in terminals
|
||||||
|
|
||||||
## [1.19.2-hidpi]
|
## [1.19.2-hidpi]
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
@ -2098,7 +2105,8 @@ Still broken on Windows.
|
|||||||
|
|
||||||
[keep a changelog]: https://keepachangelog.com/en/1.0.0/
|
[keep a changelog]: https://keepachangelog.com/en/1.0.0/
|
||||||
[semantic versioning]: https://semver.org/spec/v2.0.0.html
|
[semantic versioning]: https://semver.org/spec/v2.0.0.html
|
||||||
[unreleased]: https://github.com/slavfox/Cozette/compare/v.1.19.2-hidpi...HEAD
|
[unreleased]: https://github.com/slavfox/Cozette/compare/v.1.19.2-hidpi2...HEAD
|
||||||
|
[1.19.2-hidpi2]: https://github.com/slavfox/Cozette/compare/v.1.19.2-hidpi...v.1.19.2-hidpi2
|
||||||
[1.19.2-hidpi]: https://github.com/slavfox/Cozette/compare/v.1.19.2...v.1.19.2-hidpi
|
[1.19.2-hidpi]: https://github.com/slavfox/Cozette/compare/v.1.19.2...v.1.19.2-hidpi
|
||||||
[1.19.2]: https://github.com/slavfox/Cozette/compare/v.1.19.1...v.1.19.2
|
[1.19.2]: https://github.com/slavfox/Cozette/compare/v.1.19.1...v.1.19.2
|
||||||
[1.19.1]: https://github.com/slavfox/Cozette/compare/v.1.19.0...v.1.19.1
|
[1.19.1]: https://github.com/slavfox/Cozette/compare/v.1.19.0...v.1.19.1
|
||||||
|
23
build.py
23
build.py
@ -8,7 +8,7 @@ from typing import Optional, Sequence, cast
|
|||||||
|
|
||||||
import crayons # type: ignore
|
import crayons # type: ignore
|
||||||
|
|
||||||
from cozette_builder.changeloggen import get_changelog
|
from cozette_builder.changeloggen import get_changelog, get_last_ver
|
||||||
from cozette_builder.hidpi import double_size
|
from cozette_builder.hidpi import double_size
|
||||||
from cozette_builder.imagegen import (
|
from cozette_builder.imagegen import (
|
||||||
add_margins,
|
add_margins,
|
||||||
@ -59,8 +59,8 @@ def fontforge(open: Path, generate: Sequence[Generate]):
|
|||||||
script = "; ".join(
|
script = "; ".join(
|
||||||
[
|
[
|
||||||
f'Open("{open}")',
|
f'Open("{open}")',
|
||||||
'RenameGlyphs("AGL with PUA")',
|
# 'RenameGlyphs("AGL with PUA")',
|
||||||
'Reencode("unicode")',
|
# 'Reencode("unicode")',
|
||||||
]
|
]
|
||||||
+ [str(gen) for gen in generate]
|
+ [str(gen) for gen in generate]
|
||||||
)
|
)
|
||||||
@ -91,6 +91,12 @@ def gen_bitmap_formats() -> Path:
|
|||||||
|
|
||||||
def fix_ttf(ttfpath: Path, name: str):
|
def fix_ttf(ttfpath: Path, name: str):
|
||||||
print(crayons.yellow(f"Generating TTF for {name}..."))
|
print(crayons.yellow(f"Generating TTF for {name}..."))
|
||||||
|
version = "1.0"
|
||||||
|
with SFDPATH.open() as f:
|
||||||
|
for line in f.readlines():
|
||||||
|
if line.startswith("Version "):
|
||||||
|
version = line.split()[1]
|
||||||
|
break
|
||||||
script = "; ".join(
|
script = "; ".join(
|
||||||
[
|
[
|
||||||
f'Open("{ttfpath}")',
|
f'Open("{ttfpath}")',
|
||||||
@ -101,8 +107,11 @@ def fix_ttf(ttfpath: Path, name: str):
|
|||||||
'RenameGlyphs("AGL with PUA")',
|
'RenameGlyphs("AGL with PUA")',
|
||||||
'Reencode("unicode")',
|
'Reencode("unicode")',
|
||||||
f'SetTTFName(0x409, 3, "{name}")',
|
f'SetTTFName(0x409, 3, "{name}")',
|
||||||
f'SetTTFName(0x409, 11, "")',
|
f'SetTTFName(0x409, 5, "{version}")',
|
||||||
'SetTTFName(0x409, 13, "MIT")',
|
f'SetTTFName(0x409, 8, "Slavfox")',
|
||||||
|
f'SetTTFName(0x409, 9, "Slavfox")',
|
||||||
|
f'SetTTFName(0x409, 11, "https://github.com/slavfox/Cozette")',
|
||||||
|
f'SetTTFName(0x409, 13, "MIT")',
|
||||||
'SetTTFName(0x409, 14, "https://opensource.org/licenses/MIT")',
|
'SetTTFName(0x409, 14, "https://opensource.org/licenses/MIT")',
|
||||||
f'Generate("{name}.dfont")',
|
f'Generate("{name}.dfont")',
|
||||||
f'Generate("{name}.otf")',
|
f'Generate("{name}.otf")',
|
||||||
@ -159,10 +168,10 @@ def gen_variants(bdf_path: Path):
|
|||||||
check=True,
|
check=True,
|
||||||
)
|
)
|
||||||
subprocess.run(
|
subprocess.run(
|
||||||
bnp_invoc_ttf("CozetteVector", "ttf") + [bdf_path], check=True
|
bnp_invoc_ttf("CozetteVector", "ttf") + [SFDPATH], check=True
|
||||||
)
|
)
|
||||||
subprocess.run(
|
subprocess.run(
|
||||||
bnp_invoc_ttf("CozetteVectorBold", "ttf") + ["-b", bdf_path],
|
bnp_invoc_ttf("CozetteVectorBold", "ttf") + ["-b", SFDPATH],
|
||||||
check=True,
|
check=True,
|
||||||
)
|
)
|
||||||
print(crayons.yellow("Fixing TTF variants..."))
|
print(crayons.yellow("Fixing TTF variants..."))
|
||||||
|
@ -46,7 +46,7 @@ scale_lines = [
|
|||||||
"FIGURE_WIDTH",
|
"FIGURE_WIDTH",
|
||||||
"AVG_LOWERCASE_WIDTH",
|
"AVG_LOWERCASE_WIDTH",
|
||||||
"AVG_UPPERCASE_WIDTH" "DWIDTH",
|
"AVG_UPPERCASE_WIDTH" "DWIDTH",
|
||||||
# "SWIDTH",
|
"DWIDTH",
|
||||||
"BBX",
|
"BBX",
|
||||||
"QUAD_WIDTH",
|
"QUAD_WIDTH",
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user