From cc3ccebbd3af825f5e4866532906f1a7a2756518 Mon Sep 17 00:00:00 2001 From: LLLL Colonq Date: Fri, 26 Apr 2024 01:53:41 -0400 Subject: Add assets --- assets/newspaper/fonts/NoticiaText-Bold.ttf | Bin 0 -> 110704 bytes assets/newspaper/fonts/NoticiaText-BoldItalic.ttf | Bin 0 -> 84400 bytes assets/newspaper/fonts/NoticiaText-Italic.ttf | Bin 0 -> 85688 bytes assets/newspaper/fonts/NoticiaText-Regular.ttf | Bin 0 -> 112736 bytes assets/newspaper/fonts/NotoColorEmoji-Regular.ttf | Bin 0 -> 24015992 bytes assets/newspaper/fonts/NotoColorEmoji.ttf | Bin 0 -> 10303860 bytes assets/newspaper/fonts/README.md | 78 ++++++++++++++++++++++ assets/newspaper/mrgreen.png | Bin 0 -> 714 bytes assets/newspaper/newspaper-mod.sty | 6 ++ assets/newspaper/template.tex | 69 +++++++++++++++++++ 10 files changed, 153 insertions(+) create mode 100644 assets/newspaper/fonts/NoticiaText-Bold.ttf create mode 100644 assets/newspaper/fonts/NoticiaText-BoldItalic.ttf create mode 100644 assets/newspaper/fonts/NoticiaText-Italic.ttf create mode 100644 assets/newspaper/fonts/NoticiaText-Regular.ttf create mode 100644 assets/newspaper/fonts/NotoColorEmoji-Regular.ttf create mode 100644 assets/newspaper/fonts/NotoColorEmoji.ttf create mode 100644 assets/newspaper/fonts/README.md create mode 100644 assets/newspaper/mrgreen.png create mode 100644 assets/newspaper/newspaper-mod.sty create mode 100644 assets/newspaper/template.tex (limited to 'assets/newspaper') diff --git a/assets/newspaper/fonts/NoticiaText-Bold.ttf b/assets/newspaper/fonts/NoticiaText-Bold.ttf new file mode 100644 index 00000000..bcce3bbf Binary files /dev/null and b/assets/newspaper/fonts/NoticiaText-Bold.ttf differ diff --git a/assets/newspaper/fonts/NoticiaText-BoldItalic.ttf b/assets/newspaper/fonts/NoticiaText-BoldItalic.ttf new file mode 100644 index 00000000..d8eec4df Binary files /dev/null and b/assets/newspaper/fonts/NoticiaText-BoldItalic.ttf differ diff --git a/assets/newspaper/fonts/NoticiaText-Italic.ttf b/assets/newspaper/fonts/NoticiaText-Italic.ttf new file mode 100644 index 00000000..bbe62434 Binary files /dev/null and b/assets/newspaper/fonts/NoticiaText-Italic.ttf differ diff --git a/assets/newspaper/fonts/NoticiaText-Regular.ttf b/assets/newspaper/fonts/NoticiaText-Regular.ttf new file mode 100644 index 00000000..1cd97588 Binary files /dev/null and b/assets/newspaper/fonts/NoticiaText-Regular.ttf differ diff --git a/assets/newspaper/fonts/NotoColorEmoji-Regular.ttf b/assets/newspaper/fonts/NotoColorEmoji-Regular.ttf new file mode 100644 index 00000000..05b42fdc Binary files /dev/null and b/assets/newspaper/fonts/NotoColorEmoji-Regular.ttf differ diff --git a/assets/newspaper/fonts/NotoColorEmoji.ttf b/assets/newspaper/fonts/NotoColorEmoji.ttf new file mode 100644 index 00000000..21828587 Binary files /dev/null and b/assets/newspaper/fonts/NotoColorEmoji.ttf differ diff --git a/assets/newspaper/fonts/README.md b/assets/newspaper/fonts/README.md new file mode 100644 index 00000000..279665cb --- /dev/null +++ b/assets/newspaper/fonts/README.md @@ -0,0 +1,78 @@ +# OpenMoji Fonts + +This directory contains the fonts generated from the OpenMoji Black and OpenMoji Color glyphs in the `/src` directory. + +Note that a single standard format for color fonts has not yet emerged, though it currently looks like the dominant color font format will be COLRv1/CPAL in OpenType (commonly referred to as `COLRv1` or `colr_1`). + +[Most browsers support COLRv1](https://caniuse.com/colr-v1) at this stage, though [COLRv0 has even wider support](https://caniuse.com/colr) (though with less features). + +Desktop applications are are less likely to support `COLR` formats at this stage, though this will hopefully change in the future. + +## Understanding the directory + +We currently offer a monochrome font (OpenMojiBlack) in a single format (Glyf in OpenType, optionally woff2 compressed). + +We offer a color font (OpenMojiColor) in a variety of formats and it is up to the user to decide which format is most appropriate for their use-case. See [section below](#color-font-formats). + +### `.ttf` vs `.woff2` + +Put simply: +- For a desktop application, use the `.ttf` file +- For a website application, use the `.woff2` file + +### Color font formats + +The monochrome font (OpenMojiBlack) comes in only a single format, which is widely supported. It can be found in the `OpenMoji-black-glyf` directory. + +The color font comes in a variety of formats: + +| Directory | Format | Description | Bitmap/Vector | Use-case | +| -------------------------------------------- | ------ | --------------------------------------- | ------------- | ----------------------------------------- | +| [`OpenMoji-color-cbdt`](OpenMoji-color-cbdt) | `CBDT` | Early format that is largely deprecated | Bitmap | Android applications, Old Chrome browsers, some desktop applications | +| [`OpenMoji-color-glyf_colr_0`](OpenMoji-color-glyf_colr_0) | `COLRv0` in OpenType | Standardised format that is superceded by `COLRv1`, limited features | Vector | Almost all modern webbrowsers, many desktop applications | +| [`OpenMoji-color-glyf_colr_1`](OpenMoji-color-glyf_colr_1) | `COLRv1` in OpenType | Emerging standard with many features | Vector | Most modern browsers (not Safari), very little support on desktop applications yet | +| [`OpenMoji-color-picosvgz`](OpenMoji-color-picosvgz) | `SVG` in OpenType | SVG-based format with compression tricks applied using `picosvg` | Vector | Firefox and Safari, some desktop applications | +| [`OpenMoji-color-sbix`](OpenMoji-color-sbix) | `SBIX` | Format primarily used by Apple | Bitmap | Safari, Chrome-based browsers, some desktop applications, MacOS, iOS | +| [`OpenMoji-color-untouchedsvgz`](OpenMoji-color-untouchedsvgz) | `SVG` in OpenType | `SVG`-based format without compression tricks | Vector | Firefox and Safari, some desktop applications | +| [`OpenMoji-color-colr0_svg`](OpenMoji-color-colr0_svg) | `SVG` in OpenType, `COLRv0` | Both `SVG` and `COLRv0` in one font | Vector | All modern webbrowsers, many desktop applications | +| [`OpenMoji-color-colr1_svg`](OpenMoji-color-colr1_svg) | `SVG` in OpenType, `COLRv1` | Both `SVG` and `COLRv1` in one font | Vector | Almost all modern webbrowsers, some desktop applications | + +We generally recommend: +- `COLRv0` with `woff2` for websites +- `SVG`+`COLRv0` with `ttf` for desktop applications, though you may want to try bitmap-based formats if this does not work. + +## Further reading + +- [CanIUse COLRv0/CPAL](https://caniuse.com/colr) +- [CanIUse COLRv1/CPAL](https://caniuse.com/colr-v1) +- [ColorfontsWTF](https://www.colorfonts.wtf/) + +## Building the fonts + +The fonts are built using Google's `nanoemoji` toolchain. + +Building all 7 fonts from scratch takes a long time (several hours), but benefits from caching for future runs. + +### Running the font builder + +Generally users are not expected to ever want to run the font builder themselves. +Adventurous users and developers can follow the guide below for instructions on how to generate the font files. + +On a Unix system (Linux, Mac, WSL2), run [`helpers/generate-fonts.sh`](../helpers/generate-fonts.sh). + +You need to have the following installed: +- [Docker](https://www.docker.com/) or [Podman](https://podman.io/) + +1. Prerequisites + 1. Be on a Unix system (Linux, Mac, WSL2, BSD, …) + 2. Have [Docker](https://www.docker.com/) or [Podman](https://podman.io/) installed +2. Open a terminal and go to the OpenMoji folder + - `cd path/to/openmoji` +3. Run the font builder + - `./helpers/generate-fonts.sh` + - Wait for build to finish. This can take a few hours for the initial run. Be patient! +4. Done ✅ + +### Changing font parameters + +Font parameters can be changed in the [`OpenMoji-color.ttx` file in the `data` folder](../data/OpenMoji-Color.ttx) diff --git a/assets/newspaper/mrgreen.png b/assets/newspaper/mrgreen.png new file mode 100644 index 00000000..1f1edcab Binary files /dev/null and b/assets/newspaper/mrgreen.png differ diff --git a/assets/newspaper/newspaper-mod.sty b/assets/newspaper/newspaper-mod.sty new file mode 100644 index 00000000..240d8ecf --- /dev/null +++ b/assets/newspaper/newspaper-mod.sty @@ -0,0 +1,6 @@ +\usepackage{newtxtext,newtxmath} +\usepackage{etoolbox} +\newcommand{\headlinestyle}{\itshape\huge} +\newcommand{\bylinestyle}{\scshape\Large} +\patchcmd{\headline}{#1}{\headlinestyle #1}{}{} +\patchcmd{\byline}{#1}{\bylinestyle #1}{}{} \ No newline at end of file diff --git a/assets/newspaper/template.tex b/assets/newspaper/template.tex new file mode 100644 index 00000000..08721762 --- /dev/null +++ b/assets/newspaper/template.tex @@ -0,0 +1,69 @@ +\documentclass{article} + +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage{microtype} +\usepackage{fontspec} + +\usepackage{newspaper} + +\date{\today} +\currentvolume{1} +\currentissue{FIG_EDITION} + +%% [LianTze] The newspaper package also provides +%% these commands to set various metadata: + +%% The banner headline on the first page +%% (The colon after s: is to get a more +%% modern majuscule s in this font instead of +%% the medieval tall s. For anyone interested +%% in the history: +%% http://medievalwriting.50megs.com/scripts/letters/historys.htm) +\SetPaperName{The Effort Post} + +%% The name used in the running header after +%% the first page +\SetHeaderName{The Effort Post} + +%% and also... +\SetPaperLocation{\#cyberspace} +\SetPaperSlogan{FIG_SLOGAN} +\SetPaperPrice{FIG_PRICE} + + +% [LianTze] times (the package not the font) is rather outdated now; use newtx (see later) +% \usepackage{times} +\usepackage{graphicx} +\usepackage{multicol} + +\usepackage{picinpar} +%uasage of picinpar: +%\begin{window}[1,l,\includegraphics{},caption]xxxxx\end{window} + + +%% [LianTze] Contains some modifications +\usepackage{newspaper-mod} +%%... so now you can redefine the headline and byline style if you want to. +%% These can be issued just before any +%% byline or headline in the paper, to +%% individually style each article +%% +% \renewcommand{\headlinestyle}{\itshape\Large\lsstyle} +% \renewcommand{\bylinestyle}{\bfseries\Large\raggedright} + + +%%%%%%%%% Front matter %%%%%%%%%% + +\usepackage{lipsum} + +\begin{document} +\maketitle + +\begin{multicols}{3} +\setmainfont{NoticiaText-Regular}[Path=/home/llll/src/fig/assets/newspaper/fonts/, Extension=.ttf, RawFeature={mode=harf}] +\newfontfamily\figemote{Noto Color Emoji}[Path=/home/llll/src/fig/assets/newspaper/fonts/, Extension=.ttf, RawFeature={mode=harf}] +FIG_ARTICLES +\end{multicols} + +\end{document} \ No newline at end of file -- cgit v1.2.3