Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

Kolaru
Copy link
Owner

@Kolaru Kolaru commented Jun 7, 2025

This PR introduces the set_texfont_family function, that can be used to more easily change the default font used by the engine:

# Change to a different font familiy entirely
julia> set_texfont_family!(FontFamily("LucioleMath"))
FontFamily with 13.0° slant angle and 0.0375 line thickness
  bold        =>  Luciole-Math\Luciole-Bold.ttf
  bolditalic  =>  Luciole-Math\Luciole-Bold-Italic.ttf
  italic      =>  Luciole-Math\Luciole-Regular-Italic.ttf
  math        =>  Luciole-Math\Luciole-Math.otf
  regular     =>  Luciole-Math\Luciole-Regular.ttf

# Change just the regular and bold fonts, keep the default for the rest
julia> set_texfont_family!(regular = raw"C:\Users\Kolaru\.julia\dev\MathTeXEngine\experimental\utopia\Utopia-Regular.ttf", bold = raw"C:\Users\Kolaru\.julia\dev\MathTeXEngine\experimental\utopia\Utopia-Bold.ttf")
FontFamily with 13.0° slant angle and 0.0375 line thickness
  bold        =>  C:\Users\Kolaru\.julia\dev\MathTeXEngine\experimental\utopia\Utopia-Bold.ttf
  bolditalic  =>  NewComputerModern\NewCM10-BoldItalic.otf
  italic      =>  NewComputerModern\NewCM10-Italic.otf
  math        =>  NewComputerModern\NewCMMath-Regular.otf
  regular     =>  C:\Users\Kolaru\.julia\dev\MathTeXEngine\experimental\utopia\Utopia-Regular.ttf

# Switch back to the default
julia> set_texfont_family!()
FontFamily with 13.0° slant angle and 0.0375 line thickness
  bold        =>  NewComputerModern\NewCM10-Bold.otf
  bolditalic  =>  NewComputerModern\NewCM10-BoldItalic.otf
  italic      =>  NewComputerModern\NewCM10-Italic.otf
  math        =>  NewComputerModern\NewCMMath-Regular.otf
  regular     =>  NewComputerModern\NewCMMath-Regular.otf

@Kolaru Kolaru merged commit 2b777f5 into master Jun 13, 2025
4 checks passed
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.

1 participant