MonoLisaFont / feedback

Send us your feedback regarding the MonoLisa font
86 stars 2 forks source link

[Feature request]: LaTeX Support for MonoLisa Font Family #279

Open umuench opened 2 months ago

umuench commented 2 months ago

What feature are you proposing?

Dear MonoLisa Team,

I hope this message finds you well. First, I would like to express my appreciation for the excellent work you have done with the MonoLisa font. Its design and readability make it a fantastic choice for various programming and writing environments.

As a frequent LaTeX user, I have been trying to integrate MonoLisa into my LaTeX documents. While it is possible to use the font with some manual adjustments, I believe that many users would benefit from an officially supported LaTeX package or guidelines on how to correctly integrate MonoLisa with LaTeX.

Here are a few potential benefits for MonoLisa having LaTeX support:

  1. Wider Audience: Many academic, technical, and professional communities rely heavily on LaTeX for document preparation.
  2. Consistency: A well-integrated LaTeX package would ensure consistency across all weights and styles of the MonoLisa font family, making it easier for users to utilize the full potential of the font.
  3. Ease of Use: An official package or clear instructions would significantly simplify the process of using MonoLisa in LaTeX, especially for users unfamiliar with manually configuring fontspec or other LaTeX tools.

Would it be possible to consider adding support for LaTeX? This could be done through a custom .sty file or package that provides seamless integration for the various font weights and styles, such as Regular, Bold, Italic, and all other variants available in the MonoLisa font family.

Thank you for considering this feature request. I am confident that LaTeX support would be highly appreciated by the broader MonoLisa community. If you need further details or feedback, I would be happy to assist.

Best regards, Uwe Markus Münch

bebraw commented 2 months ago

I think https://github.com/tonsky/FiraCode/wiki/LaTeX-instructions could be a good starting point for this depending on the intended usage.

bebraw commented 2 months ago

It looks like you can get a nice starting point with https://github.com/RuixiZhang42/lstfiracode . Here are steps to follow:

  1. Copy MonoLisa font file(s) to your LaTeX project
  2. Set up code as follows:
\usepackage{fontspec}
% This should match the name of your font file
\setmonofont{MonoLisa.ttf}[
  Contextuals=Alternate  % Activate the calt feature
]
\usepackage{listings}
\usepackage{lstfiracode} % https://ctan.org/pkg/lstfiracode
\lstset{
  language=C++,
  style=FiraCodeStyle,   % Use predefined FiraCodeStyle
  basicstyle=\ttfamily   % Use \ttfamily for source code listings
}

Here's sample code to render:

\begin{lstlisting}
/* A simple C++ program */
int main() {
    cout << "Hello World"; // prints Hello World
    return 0;
}
\end{lstlisting}

To customize rendering further to your liking, copy https://github.com/RuixiZhang42/lstfiracode/blob/master/lstfiracode.sty to your project and then adjust to remove/add ligatures.

Here's a sample render:

Screenshot 2024-09-13 at 11 38 05

For code highlighting, minted is a good option as it has a nice support for different languages.