Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mono fonts not showing, no errors on invalid fonts #8

Open
SkoZombie opened this issue Aug 20, 2024 · 1 comment
Open

Mono fonts not showing, no errors on invalid fonts #8

SkoZombie opened this issue Aug 20, 2024 · 1 comment

Comments

@SkoZombie
Copy link

When generating the document without any parameters, mono text is rendered with a proportional font:

image

I tried overriding the fonts in the config file:

{
  "font": {
    "baseSize": 10,
    "mono": {
      "norm": {
        "face": "/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf"
      },
      "bold": {
        "face": "/usr/share/fonts/truetype/dejavu/DejaVuSansMono-Bold.ttf"
      },
      "italic": {
        "face": "/usr/share/fonts/truetype/dejavu/DejaVuSansMono-Oblique.ttf"
      }
    }
}

However this did not make any visible difference. The config was definitely loading as it was respecting the baseSize setting.

When I set the face to an invalid font name/ path there were no errors in the console indicating it couldn't find the specified font.

I'm using Linux Mint with ApiBake 0.1.25.

Thanks for this tool! I hope more people use it as it's got a lot of promise to include in CI/CD workflows to automate documentation generation.

@SkoZombie
Copy link
Author

It seems like it's not embedding the fonts at all which indicates they're not being used/ called. When scanning the output:

> pdffonts output.pdf 
name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
Helvetica-Bold                       Type 1            WinAnsi          no  no  no       8  0
Helvetica                            Type 1            WinAnsi          no  no  no       9  0

I cloned the repo and it seems like a lot of the output functions don't use the mono font so this might be be by design?

Generally my expectation is JSON is formatted with a mono font like the other OpenAPI/ Swagger tools.

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

No branches or pull requests

1 participant