diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..8470a05ad --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM debian:trixie-slim AS base +RUN apt-get update && \ + apt-get install -y git make python3-fontforge ttfautohint + +FROM base AS build +RUN useradd -m -s /bin/bash garamond && \ + mkdir -p /eb-garamond && \ + chown garamond:garamond /eb-garamond + +VOLUME /eb-garamond +USER garamond +WORKDIR /eb-garamond +RUN git config --global --add safe.directory /eb-garamond +ENTRYPOINT ["sh", "-c", "make clean && make"] diff --git a/Makefile b/Makefile index 90b5f2ba3..46601c408 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,30 @@ NAME=EBGaramond + TAG_COMMIT := $(shell git rev-list --abbrev-commit --tags --max-count=1) +ifndef TAG_COMMIT +override TAG_COMMIT := 000000000 +endif + TAG := $(shell git describe --abbrev=0 --tags ${TAG_COMMIT} 2>/dev/null || true) +ifndef TAG +override TAG := local +endif + COMMIT := $(shell git rev-parse --short HEAD) +ifndef COMMIT +override COMMIT := 000000000 +endif + DATE := $(shell git log -1 --format=%cd --date=format:"%Y%m%d") +ifndef DATE +override DATE := $(shell date +"%Y%m%d") +endif + VERSION := $(TAG:v%=%) +ifndef VERSION +override VERSION := $(shell date +"%Y%m%d")-local +endif + ifneq ($(COMMIT), $(TAG_COMMIT)) VERSION := $(VERSION)-next-$(COMMIT)-$(DATE) endif diff --git a/README.md b/README.md index be805223d..0b84dda53 100644 --- a/README.md +++ b/README.md @@ -1,51 +1,72 @@ # EB Garamond + *Claude Garamont’s designs go open source* This project aims at providing a free version of the Garamond types, based on the Designs of the Berner specimen from 1592. In the end, the fonts shall cover extended latin, greek and cyrillic scripts in different styles (regular, italic, bold, bolditalic) and design sizes. There are also fonts containing initials based on those found in a 16th century french bible print. The fonts make heavy use of opentype features for specialities like small caps or different number styles as well as for imitating renaissance typography. -For the use with Xe- and LuaLaTeX I’m working on a configuration for mycrotype. For the use on the web via @fontface, the make-script produces eot and woff files which can be found in the web section. But be aware that they are not subset but contain the whole fonts, which might result in undesirably big files. Webfont hosters like googlefonts or fontsquirrel might provide better solutions. +For the use with Xe- and LuaLaTeX I’m working on a configuration for mycrotype. For the use on the web via `@fontface`, the make-script produces eot and woff files which can be found in the web section. But be aware that they are not subset but contain the whole fonts, which might result in undesirably big files. Webfont hosters like googlefonts or fontsquirrel might provide better solutions. ## Fonts in this repository | Font | Description | |------|-------------| -| EBGaramond-Initials | Initials -| EBGaramond-InitialsF1 | Background (the ornament) of initials -| EBGaramond-InitialsF2 | Foreground (the letter) of initials -| EBGaramond-Lettrines | Workbench for Initials fonts (not included in releases) -| EBGaramond08-Italic | Italic font for design size 8pt (very rough spacing!) -| EBGaramond08-Regular | Regular font for design size 8pt -| EBGaramond12-AllSC | All smallcaps font for programs that ignore opentype features -| EBGaramond12-Italic | Italic font for design size 12pt -| EBGaramond12-Regular | Regular font for design size 12pt -| EBGaramond12-Bold | Bold font for design size 12pt (very rough/unusable; not included in releases) -| EBGaramondSC08-Regular | Smallcaps font for programs that ignore opentype features (12pt) -| EBGaramondSC08-Regular | Smallcaps font for programs that ignore opentype features (12pt) - - -This is a work in progress, so expect bugs! The quality of the fonts still varies widely! You can see every font’s current state in its *-Glyphs.pdf file in the specimen section. +| EBGaramond-Initials | Initials| +| EBGaramond-InitialsF1 | Background (the ornament) of initials| +| EBGaramond-InitialsF2 | Foreground (the letter) of initials| +| EBGaramond-Lettrines | Workbench for Initials fonts (not included in releases)| +| EBGaramond08-Italic | Italic font for design size 8pt (very rough spacing!)| +| EBGaramond08-Regular | Regular font for design size 8pt| +| EBGaramond12-AllSC | All smallcaps font for programs that ignore opentype features| +| EBGaramond12-Italic | Italic font for design size 12pt| +| EBGaramond12-Regular | Regular font for design size 12pt| +| EBGaramond12-Bold | Bold font for design size 12pt (very rough/unusable; not included in releases)| +| EBGaramondSC08-Regular | Smallcaps font for programs that ignore opentype features (12pt)| +| EBGaramondSC08-Regular | Smallcaps font for programs that ignore opentype features (12pt)| + +This is a work in progress, so expect bugs! The quality of the fonts still varies widely! You can see every font’s current state in its `*-Glyphs.pdf` file in the specimen section. ## Downloads | Type | URL | |------|-----| -| Nightly build | https://github.com/georgd/EB-Garamond/releases/download/nightly/EBGaramond.zip | -| Releases | https://bitbucket.org/georgd/eb-garamond/downloads/ | +| Nightly build | | +| Releases | | -For more infos please visit http://www.georgduffner.at/ebgaramond/ +For more infos please visit ## Build instructions To build the fonts from source on the latest Debian or Ubuntu, you will need the FontForge python libraries and the Freetype TTF auto hinter installed: -``` + +```bash sudo apt-get install python3-fontforge ttfautohint ``` -Then run make, and the fonts should appear in a `build` subdirectory: -``` +Then run make, and the fonts should appear in `build` and `web` subdirectories: + +```bash make ``` **Note:** You may need to run `make clean` first, to remove any leftover files from previous builds. + +## Use Docker + +Alternatively, if you have Docker available, you may invoke build using a +Docker container, without having to install build dependencies locally: + +```bash +docker build -t eb-garamond-build . +docker run --rm -t -i -v "$(pwd):/eb-garamond" eb-garamond-build +``` + +The fonts should appear in the `build` and `web` subdirectories. + +*(Optional)* If your local user / group ID does not match those IDs of +Dockerfile build user (`1000:1000`), you may need to adjust build output like so + +```bash +chown -R $(id -u):$(id -g) ./build ./web +```