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

Custom theme fallback font error #609

Closed
habamax opened this issue Oct 6, 2016 · 2 comments
Closed

Custom theme fallback font error #609

habamax opened this issue Oct 6, 2016 · 2 comments

Comments

@habamax
Copy link
Contributor

habamax commented Oct 6, 2016

I have custom theme which defines some fonts.

font:
  catalog:
    Main:
      normal: roboto-regular.ttf
      bold: roboto-bold.ttf
      italic: roboto-italic.ttf
      bold_italic: roboto-bolditalic.ttf
    Mono:
      normal: roboto-mono-regular.ttf
      bold: roboto-mono-bold.ttf
      italic: roboto-mono-italic.ttf
      bold_italic: roboto-mono-bolditalic.ttf
    Heading:
      normal: cuprum-regular.ttf
      bold: cuprum-bold.ttf
      italic: cuprum-italic.ttf
      bold_italic: cuprum-bolditalic.ttf

It works but no special symbols are rendered.

Now following the documentation I have added a fallback font:

font:
  catalog:
    Main:
      normal: roboto-regular.ttf
      bold: roboto-bold.ttf
      italic: roboto-italic.ttf
      bold_italic: roboto-bolditalic.ttf
    Mono:
      normal: roboto-mono-regular.ttf
      bold: roboto-mono-bold.ttf
      italic: roboto-mono-italic.ttf
      bold_italic: roboto-mono-bolditalic.ttf
    Heading:
      normal: cuprum-regular.ttf
      bold: cuprum-bold.ttf
      italic: cuprum-italic.ttf
      bold_italic: cuprum-bolditalic.ttf
    DroidSansFallback:
      normal: droid-sans-fallback.ttf
      bold: droid-sans-fallback.ttf
      italic: droid-sans-fallback.ttf
      bold_italic: droid-sans-fallback.ttf
  fallbacks:
    - DroidSansFallback

And asciidoctor-pdf complains:

undefined method `unpack' for nil:NilClass
   Use --trace for backtrace

And the document I try to render has only

From -> to => smth

Am I missing smth?

@habamax
Copy link
Contributor Author

habamax commented Oct 6, 2016

Well looks like the font I have downloaded from site pointed in the documentation is corrupted.

Using built in M+ fallback (copied from gem path) solves the issue.

@habamax habamax closed this as completed Oct 6, 2016
@mojavelinux
Copy link
Member

It may have had to do with how you downloaded it. I'm going to link to the file on GitHub, which I think is more approachable.

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

2 participants