diff options
| author | Gabriel Schneider <[email protected]> | 2026-10-28 21:07:13 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-12 13:22:02 -0300 |
| commit | 590ba7b9b579b97e34b51ab7e3460ebc85713343 (patch) | |
| tree | 6a73a7570ff4f79f41deff078455877b9bc6571b /vendor/fonts | |
| parent | bc8e6eb1bfef0c5e9b3c40fc1e4fd5a1659e2b03 (diff) | |
| download | sketchbook-590ba7b9b579b97e34b51ab7e3460ebc85713343.tar.gz sketchbook-590ba7b9b579b97e34b51ab7e3460ebc85713343.zip | |
sketchbook: Zig 0.17, a Store on disk, requests, a scope (waveform, spectrum, spectrogram), audio codecs and fonts, web host
Diffstat (limited to 'vendor/fonts')
| -rw-r--r-- | vendor/fonts/Go-Mono.ttf | bin | 0 -> 173248 bytes | |||
| -rw-r--r-- | vendor/fonts/LICENSE | 36 | ||||
| -rw-r--r-- | vendor/fonts/README.md | 52 |
3 files changed, 88 insertions, 0 deletions
diff --git a/vendor/fonts/Go-Mono.ttf b/vendor/fonts/Go-Mono.ttf Binary files differnew file mode 100644 index 0000000..853d473 --- /dev/null +++ b/vendor/fonts/Go-Mono.ttf diff --git a/vendor/fonts/LICENSE b/vendor/fonts/LICENSE new file mode 100644 index 0000000..7043c36 --- /dev/null +++ b/vendor/fonts/LICENSE @@ -0,0 +1,36 @@ +These fonts were created by the Bigelow & Holmes foundry specifically for the +Go project. See https://blog.golang.org/go-fonts for details. + +They are licensed under the same open source license as the rest of the Go +project's software: + +Copyright (c) 2016 Bigelow & Holmes Inc.. All rights reserved. + +Distribution of this font is governed by the following license. If you do not +agree to this license, including the disclaimer, do not distribute or modify +this font. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of Google Inc. nor the names of its contributors may be + used to endorse or promote products derived from this software without + specific prior written permission. + +DISCLAIMER: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/fonts/README.md b/vendor/fonts/README.md new file mode 100644 index 0000000..f86058e --- /dev/null +++ b/vendor/fonts/README.md @@ -0,0 +1,52 @@ +# Native text + +Linux Sketchbook text uses bundled **Go Mono** through PangoCairo: HarfBuzz +shaping, Fontconfig fallback and FreeType/Cairo grayscale antialiasing with light +hinting. This follows the rendering quality choices in Pardes `src/gui/font.c`; +it does not copy Pardes's terminal-cell shaping, bold synthesis or glyph atlas. + +`Go-Mono.ttf` is from the Go project's official `golang/image` repository: +https://github.com/golang/image/tree/master/font/gofont/ttfs +SHA-256: `8bc66a0154bbf69cd24e5bde41a12ec9495c8a242c5def2255e4a164900f1ed7`. +The complete Bigelow & Holmes / Go font license is in `LICENSE`. + +The font is embedded in the binary with C23 `#embed`. It is registered in a +private Fontconfig config through a Linux memfd, so moving the executable does +not require a font installation or the source checkout. Installed outline fonts +provide Unicode fallback, in the order listed in `vendor/text.c`; actual glyph +coverage and emoji color depend on those fonts. Color font paint is preserved. +No system Fontconfig settings are modified. + +The `f.text`/`f.print` API is unchanged. Their x/y positions mean line-box top. +Scale 1 uses a nominal 13px font: Go Mono measures 8px ASCII advance and 16px +line height on the tested stack. At other sizes advances may round to a physical +pixel. Applications should allow a 16×scale line box and avoid slicing UTF-8 at +arbitrary byte boundaries. Pango shapes each supplied string independently; +applications still perform wrapping and clipping. Explicit newlines are not a +layout API. Other platforms retain SDL's debug-font fallback for now. + +Text is rasterized at the renderer's physical pixel density (including logical +presentation scale), and texture origins snap to physical pixels. Whole-run +textures retain antialiasing and shaping; no scaled 8×8 bitmap text is involved. +The renderer-owned cache retains at most 512 strings / 16 MiB of pixel data. +Only prior-frame textures can be evicted; exceptionally dense frames flush and +release temporary textures rather than growing the cache. Renderer destruction +releases the font map, descriptors and keys after SDL releases its textures. + +Native Linux builds need `pkg-config`, `pangocairo`, and `pangoft2` development +packages, in addition to SDL. The resulting executable uses the system Pango, +Cairo, HarfBuzz, Fontconfig and FreeType libraries. + +Run the independent regression and specimen (with system SDL3): + +```sh +cc -std=c23 -Wall -Wextra -Werror -O2 test/fonts.c -o /tmp/sketchbook-fonts \ + $(pkg-config --cflags --libs sdl3 pangocairo pangoft2) -lm +/tmp/sketchbook-fonts /tmp/sketchbook-fonts.png +``` + +It checks the primary font's advance/line box, Unicode fallback, zero-advance +combining marks, Arabic lam-alef shaping, 2× rendering density, clipping, cache +eviction and renderer cleanup. The specimen includes Latin, Greek, Cyrillic, +Japanese, Arabic, Hebrew and symbols/emoji. Missing fallback fonts fail the +coverage assertion rather than silently claiming complete Unicode support. |
