highmark-fonts
v3.0.17
Published
Computer Modern fonts for Highmark.
Readme
Highmark Fonts
STIX fonts for Highmark.
https://github.com/stipub/stixfonts
There are five fonts available:
- STIX Two Math Regular
- STIX Two Text Regular
- STIX Two Text Bold
- STIX Two Text Italic
- STIX Two Text Bold Italic
As well as these fonts this package also contains maps of commonly used symbolic Unicode characters. The keys and values are the Unicode character names and code points, respectively. The complete list is:
- shapes
- angles
- arrows
- harpoons
- equality
- ordering
- calculus
- relational
- arithmetic
- greekLetters
- headedArrows
- miscellaneous
- classTheoretic
- logicalOperators
- circlesOrCircled
- tacksAndTurnstiles
- doubleAndTripleArrows
- parenthesesAndBrackets
- superscriptsAndSubscripts
There are also maps for some of the mathematical character blocks. In these maps the values are again the code points but the keys are standard Latin characters, for easy mapping. The complete list is:
- Script
- Fraktur
- Monospace
- Double-struck
- Serif Bold
- Serif Italic
- Serif Bold italic
- Sans-serif
- Sans-serif bold
- Sans-serif italic
- Sans-serif bold italic
Note that these blocks do not pertain to font faces. They are distinct blocks of Unicode characters, they are not collections of glyphs. These blocks are important in mathematics and other forms or reasoning because they communicate meaning. A double struck capital ℂ typically represents the complex numbers, for example, whilst a cursive capital 𝒞 might represent a category.
Contents
Introduction
Highmark is a document preparation system inspired by Markdown and TeX. There are several packages in the distribution.
- Highmark-CLI Highmark's CLI tool.
- Highmark Yapp Highmark with Yapp listings.
- Highmark Fonts STIX fonts for Highmark.
- Highmark Client Highmark's bundled client for viewing HTML.
- Highmark Markdown Highmark's Markdown and Markdown Style languages.
Only the CLI tool is needed by end users. All of the other packages are likely only of interest to prospective developers.
Installation
If you would like to contribute or would simply like to have a look at the code, you can clone the repository with Git...
git clone https://github.com/djalbat/highmark-fonts.git...and then install the dependencies with npm from within the project's root directory:
npm installExample
There is a small development server that can be run from within the project's directory with the following command:
npm startThe example will then be available at the following URL:
http://localhost:8888
The source for the example can be found in the src/example.js file and correspondingsrc/example folder.
You are encouraged to try the example whilst reading what follows.
You can rebuild it on the fly with the following command:
npm run watch-debugThe development server will reload the page whenever you make changes.
One last thing to bear in mind is that this package is included by way of a relative rather than a package import. If you are importing it into your own application, however, you should use the standard package import.
Usage
In order to make use of the fonts, the @font-face CSS at-rules must be added:
import withStyle from "easy-with-style";
import { stixStyle } from "highmark-fonts";
const { renderStyle } = withStyle;
renderStyle(stixStyle);Then copy the font directory to your own application.
The symbolic character maps can be imported individually or as a whole:
import { symbolicCharacterMap, symbolicCharacterMaps } from "highmark-fonts";
let triangleCodePoint;
triangleCodePoint = symbolicCharacterMap["TRIANGLE"];
const shapesCharacterMap = characterMaps["shape"];
triangleCodePoint = shapesCharacterMap["TRIANGLE"];The value of the triangleCodePoint variable will be identical in both cases.
In the case of the alpha-numeric characters maps, as already mentioned, the keys are just the Latin characters:
import { alphaNumericCharacterMaps } from "highmark-fonts";
const doubleStructCharacterMap = alphaNumericCharacterMaps["DoubleStruck"];
const doubleStuckCapitalNCodePoint = doubleStructCharacterMap["N"];Building
Automation is done with npm scripts, have a look at the package.json file. The pertinent commands are:
npm run build-debug
npm run watch-debug