Skip to content

Default mono-space font is not mono-space #211

@S0AndS0

Description

@S0AndS0

Describe the bug

Default mono-space font is not mono-space, especially noticeable when using non-ASCII characters

To Reproduce
Steps to reproduce the behavior:

  1. Write a /tmp/test.md file with the following content
┏━━━━━━━━━━━━━━━┓
┃     If you have to ask the price    ┃
┃         then you cannot afford       ┃
┃                   Special Hugs                ┃
┗━━━━━━━━━━━━━━━┛
  1. Use freeze /tmp/test.md
  2. Preview with okular freeze.png
  3. Notice how things almost line-up, but don't

Expected behavior
I expect something like the following input to be mono-spaced, in Vim (I use Vim BTW™), and on GitHub;

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃   If you have to ask the price    ┃
┃      then you cannot afford       ┃
┃          Special Hugs             ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

... but it seems even The GitHubs no likes to mono-space 0x2501 characters :-\

Screenshots

If applicable, add screenshots to help explain your problem.

Example of Freeze output given first given input
Freeze example

Example of Vim display with second example input
Vim example

Desktop (please complete the following information):

  • OS: GNU Linux (Arch BTW™)
  • Browser "Wat?!"
  • Version freeze version v0.2.2 (80921ba)

Smartphone (please complete the following information):
Not Applicable

Additional context
Not Applicable


Update -- 2025-05-24

Found a work-around!

  • Find mono-space fonts available on system

    fc-list | sort -u | grep -i mono
  • Mess about to find something that really is mono-space by defining it in configs
    ~/.config/freeze/user.json (snip)

    {
    	"font": {
    		"family": "Liberation Mono",
    		"file": "/usr/share/fonts/liberation/LiberationMono-Regular.ttf",
    		"size": 14,
    		"ligatures": false
    	}
    }
  • Explicitly use config

    freeze -c ~/.config/freeze/user.json -l markdown <<'EOF'
    ```
    ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
    ┃   If you have to ask the price    ┃
    ┃      then you cannot afford       ┃
    ┃          Special Hugs             ┃
    ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
    ```
    EOF
  • Delight in the joy of mono-space font that is mono-space example of it working

While this doesn't resolve the issue of freeze default mono-space font not being mono-space, nor will it work on systems without alternative fonts to chose from, but hopefully this Issue will help anyone else struggling with making questionable usage choices x-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions