1

I have tried to add a custom local font(tex-gyre-adventor) in gantry 5 font-picker, but I keep getting this error: "A YAML file cannot contain tabs as indentation at line 46 (near " tex-gyre-adventor:")"

I added this code in theme.yaml:-

  fonts:
    roboto:
      400: 'gantry-theme://fonts/roboto_regular_macroman/Roboto-Regular-webfont'
      500: 'gantry-theme://fonts/roboto_medium_macroman/Roboto-Medium-webfont'
      700: 'gantry-theme://fonts/roboto_bold_macroman/Roboto-Bold-webfont'
    tex-gyre-adventor:
    400: 'gantry-theme://fonts/texgyreadventor-regular-webfont'
    400italic: 'gantry-theme://fonts/texgyreadventor-italic-webfont'
    700: 'gantry-theme://fonts/texgyreadventor-bold-webfont'
    700italic: 'gantry-theme://fonts/texgyreadventor-bolditalic-webfont'

Kindly help me resolve this, your assistance is greatly appreciated.

1

YAML files use 2 or 4 spaces for indentation but tab indentation is forbidden.

Use search and replace in your editor to replace each tab with a double space and then check your indentation is correct.

Reference: https://stackoverflow.com/a/19976827/1983389

  • I have removed the tabs and added 2 spaces as you've suggested, but now i'm getting this error: "A YAML file cannot contain tabs as indentation at line 51 (near " ")" – Viktor Dmitriev Feb 21 '16 at 5:44
  • 1
    Looks like you are on the right track. :) – Neil Robertson Feb 21 '16 at 5:47
  • When I check line 51, it's a command block, and when I remove the tabs, I get a series of errors that follow the code is as it's executed. When I remove my added code, there are no errors. Do tabs in YAML mean a newline? Kindly assist – Viktor Dmitriev Feb 21 '16 at 5:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.