Skip to content

Conversation

@breezykermo
Copy link
Contributor

This is necessary for MacOS. Closes #74.

This is necessary for MacOS.
@breezykermo
Copy link
Contributor Author

@willcrichton would you mind checking that this fixes the problem on your version of MacOSX?

@willcrichton
Copy link
Collaborator

This works, but produces warnings:

warning: unknown font family: inter
   ┌─ portable_epubs.typ:29:17
   │
29 │ #set text(font: ("Inter", "San Francisco", "Arial", "Helvetica"))
   │                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: unknown font family: san francisco
   ┌─ portable_epubs.typ:29:17
   │
29 │ #set text(font: ("Inter", "San Francisco", "Arial", "Helvetica"))
   │

@breezykermo
Copy link
Contributor Author

I've decided (somewhat arbitrarily) to default to Times New Roman, with fallbacks to Arial and Helvetica in the event that the first doesn't exist on the system. Though I generally use Inter as my preferred sans-serif font, it's not commonly installed on systems and so isn't reasonable to assume.

@breezykermo breezykermo merged commit c0363c4 into dev Jan 21, 2026
1 check passed
breezykermo added a commit that referenced this pull request Jan 25, 2026
* Adds mechanism to conditionally check EPUB (#68)

* Updates git submodules to latest

* Updates git submodules to latest

* Returns "epub" in target() during EPUB compilation

* Updates git submodules to latest

* Extracts XHTML content from EPUB archives for testing

* Saves EPUB XHTML content to reference files during test updates

* Verifies EPUB XHTML content against reference files during tests

* Tests target() function behavior in imported modules

* Adds XHTML reference files for all EPUB tests

* Updates EPUB module reference output to desired behavior

* Injects target() override into all Typst files during EPUB compilation

* Tests target() override in Typst Universe packages

* Uses sys.inputs for EPUB target detection instead of target() override

* Documents sys.inputs.rheo-target pattern for EPUB detection

* Injects target() polyfill using sys.inputs for EPUB compilation

* Documents sys.inputs.rheo-target for library developers

* Updates git submodules to latest

* Fixes lints

* Updates git submodules to latest

* Renders <br/> tags as self-closing in EPUB (#70)

* Renders <br/> tags in EPUB

* Fixes lints

* Corrects doc links in README (#76)

* Defaults to reasonable font (#77)

* Defaults to reasonable font

This is necessary for MacOS.

* Use Times New Roman as a default font

* Release 0.1.1
@breezykermo breezykermo deleted the fix/inject-default-font branch January 25, 2026 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Default fonts on macos

3 participants