Skip to content

v0.8.0

Latest

Choose a tag to compare

@omartelo omartelo released this 19 Oct 14:53

Added

  • New, NewSplit and NewDiffView work without fontconfig, on Windows,
    macOS and a Linux that lacks it: they read the fonts in the platform's font
    directories (%WINDIR%\Fonts and the user's on Windows; /System/Library/Fonts,
    /Library/Fonts and ~/Library/Fonts on macOS; the XDG ones on Linux), match
    the family by the name each font carries, and fall back to those fonts for a
    character the family lacks, CJK included. "monospace" is the platform's
    own (Cascadia Mono or Consolas on Windows, Menlo on macOS). Where fontconfig
    is installed nothing changes.
  • ErrFontNotFound, what New fails with, without fontconfig, when no
    installed font is of the family asked for.

Changed

  • New no longer fails with ErrNoFontconfig where fontconfig is missing.
    A caller that tested for it to fall back to NewFromFonts tests for
    ErrFontNotFound instead.

Deprecated

  • ErrNoFontconfig: New never returns it.

Fixed

  • A family whose styles live in one collection file (.ttc) draws each
    style from its own font.
    fontconfig names a font in a collection by file
    and index, and the index was dropped: every style came from the file's first
    font, so bold or italic text could come out regular, or in another family
    the collection holds.
  • A character the family lacks is drawn from the font fontconfig ranks
    first, also when that font is in a collection.
    The fallback took the
    collection's first font instead: drawn bold or in another family the file
    holds, or as a box when that font lacked the character.