Skip to content

Commit

Permalink
Merge branch 'prerelease'
Browse files Browse the repository at this point in the history
  • Loading branch information
be5invis committed Jan 20, 2024
2 parents 84106f5 + d5cbbc8 commit 91dd41b
Show file tree
Hide file tree
Showing 34 changed files with 4,096 additions and 1,202 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
## Modifications since last major version

### 28.0.6

* Fix application of `APLF` for several [Uiua](https://www.uiua.org/) operators.
* Adjust serif shapes for lowercase italic Yeri glyphs with corner body shape (#2151).
* Adjustments to CV defaults:
- Make `a` (`cv26`) use `single-storey-tailed` under slab italic by default.
- Make `b` (`cv27`) use `toothed-motion-serifed` under slab italic by default.
- Make `g` (`cv32`) use `single-storey-serifless` under slab italic by default.
- Make `q` (`cv41`) use `straight-bottom-serifed` under slab italic by default.


### 28.0.5

* Add characters:
Expand Down
6 changes: 6 additions & 0 deletions changes/28.0.6.md
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
* Fix application of `APLF` for several [Uiua](https://www.uiua.org/) operators.
* Adjust serif shapes for lowercase italic Yeri glyphs with corner body shape (#2151).
* Adjustments to CV defaults:
- Make `a` (`cv26`) use `single-storey-tailed` under slab italic by default.
- Make `b` (`cv27`) use `toothed-motion-serifed` under slab italic by default.
- Make `g` (`cv32`) use `single-storey-serifless` under slab italic by default.
- Make `q` (`cv41`) use `straight-bottom-serifed` under slab italic by default.
274 changes: 137 additions & 137 deletions doc/PACKAGE-LIST.md

Large diffs are not rendered by default.

3,162 changes: 2,912 additions & 250 deletions doc/custom-build.md

Large diffs are not rendered by default.

904 changes: 452 additions & 452 deletions doc/packages-sha.txt

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM node:lts-slim

RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
apt-transport-https ca-certificates curl ttfautohint \
&& rm -rf /var/lib/apt/lists/*

COPY build.sh /
WORKDIR /work
ENTRYPOINT ["bash", "/build.sh"]
48 changes: 48 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
## Make docker image
```
git clone --depth=1 https://github.com/be5invis/Iosevka.git $HOME/mkdkimg
cd $HOME/mkdkimg/docker
docker build -t=fontcc .
docker images | grep fontcc # Confirm that the docker image is generated successfully
fontcc latest c847d5e08886 About a minute ago 491MB
cd ../..
rm -rf mkdkimg/
```
Note: Make docker image need execute only one time.

## Usage
`docker run -it --rm -v $PWD:/work fontcc <BUILD_ARGS>`
Please refer to the `<BUILD_ARGS>` parameters to [Customized Build](../../dev/doc/custom-build.md#customized-build)
### Optional parameters (put them before `fontcc`):
1. `-e "VERSION_TAG=<tag>"`

`<tag>` can be the following values
- `main` git main branch
- `dev` git dev branch
- `v28.0.5` git [release version tags](../../../tags)

When this variable is omitted, the tag of the latest release will be selected

2. `-e "NPM_REG=<npm repository mirror url>"`

change `npm install` download repository to mirror site.

eg. change npm repos to huawei mirror
`docker run -it --rm -v $PWD:/work -e "NPM_REG=https://mirrors.huaweicloud.com/repository/npm" fontcc contents::Iosevka`

## Example
### Partially Build dev branch
```
mkdir -p $HOME/build_fonts
cd $HOME/build_fonts
docker run -it --rm -v $PWD:/work -e "VERSION_TAG=dev" fontcc contents::IosevkaSS06 ttf::IosevkaSS12 webfont::IosevkaSS15
ls -lR dist/
```
### Customized Build
```
cd $HOME/mycustomfonts
cat myfont1.toml myfont2.toml myfont3.toml > private-build-plans.toml
docker run -it --rm -v $PWD:/work fontcc ttf::myfont1 ttf::myfont2 contents::myfont3
ls -lR dist/
```
Note: You need prepare myfont1.toml myfont2.toml myfont3.toml youself, The [Customizer](https://be5invis.github.io/Iosevka/customizer) can help you easily generate font configuration file `.toml`.
57 changes: 57 additions & 0 deletions docker/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#!/usr/bin/bash
TMP_BUD="/tmp/IosevkaDockerBuild"
WORK_DIR="/work"
PRIVATE_FILE="private-build-plans.toml"
DEFAULT_ARGS="contents::Iosevka"
HAS_CUSTOM=0
BUILD_ARGS="$@"
set -e
rm -rf $TMP_BUD
mkdir -p $TMP_BUD
cd $TMP_BUD
[[ -z $BUILD_ARGS ]] && echo 'Usage: docker run -it --rm -v $PWD:/work fontcc <BUILD_ARGS>'
[[ -f "${WORK_DIR}/${PRIVATE_FILE}" ]] && {
HAS_CUSTOM=1
echo "Found $PRIVATE_FILE, custom build."
[[ -z $BUILD_ARGS ]] && {
FONT_NAME=$(grep -m1 -Po '(?<=\[buildPlans\.)[^\]]+' ${WORK_DIR}/${PRIVATE_FILE})
[[ -z "$FONT_NAME" ]] && {
echo "$PRIVATE_FILE file format error!"
exit 1
}
BUILD_ARGS="contents::$FONT_NAME"
}
} || {
[[ -z $BUILD_ARGS ]] && {
BUILD_ARGS="$DEFAULT_ARGS"
echo "No parameter, default build."
}
}
echo "Fonts building param: $BUILD_ARGS"

[[ -z "$VERSION_TAG" ]] && VERSION_TAG=$(curl -Ls --max-filesize 4096 \
'https://api.github.com/repos/be5invis/Iosevka/releases' \
| grep -m1 -Po '(?<="tag_name": ")v[\d\.]+')
echo "Downloading source code tarball ${VERSION_TAG}"

TARGZ_URL="https://github.com/be5invis/Iosevka/archive/${VERSION_TAG}.tar.gz"
if [[ "main" == "$VERSION_TAG" ]] || [[ "dev" == "$VERSION_TAG" ]]; then
TARGZ_URL="https://github.com/be5invis/Iosevka/archive/refs/heads/${VERSION_TAG}.tar.gz"
fi
curl -LSOs "$TARGZ_URL" \
&& tar -xf "${VERSION_TAG}.tar.gz" || {
echo "Decompression failed!"
exit 2
}
cd Iosevka*

[ "$HAS_CUSTOM" -eq 1 ] && cp "${WORK_DIR}/${PRIVATE_FILE}" .

echo "Now building fonts ${VERSION_TAG}"

[[ -n "$NPM_REG" ]] && npm config set registry $NPM_REG

npm install \
&& npm run build -- $BUILD_ARGS \
&& cp -rf dist ${WORK_DIR}/

4 changes: 2 additions & 2 deletions images/button-release.dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions images/button-release.light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 91dd41b

Please sign in to comment.