LaTeX forum ⇒ Fonts & Character SetsGreek Font not recognized Topic is solved

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm

Greek Font not recognized

Postby AleCes » Sun Feb 16, 2014 7:00 pm

Hello everybody,

I've got a Greek-only font (no Latin characters) that polyglossia none the less refuses to recognize as a Greek font! :o

Minimum example:
  1. \documentclass[a5paper, openany, 10pt]{book}
  2. \usepackage{fontspec}
  3. \defaultfontfeatures{Mapping=tex-text}
  4. \setmainfont{GFS Didot Classic}
  5. \usepackage{polyglossia}
  6. \setmainlanguage[variant=poly]{greek}
  7.  
  8. \begin{document}
  9. Ἤμουν στὸ σπίτι μου ἐγὼ.
  10. \end{document}


I didn't manage to upload the font here because OTF extension isn't allowed but you can download it here.

The error message I get is the following:
  1. ! Package polyglossia Error: The current roman font does not contain the Greek script!
  2. (polyglossia) Please define \greekfont with \newfontfamily.
  3.  
  4. See the polyglossia package documentation for explanation.
  5. Type H <return> for immediate help.

Tags:

User avatar
Johannes_B
Site Moderator
Posts: 4044
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Sun Feb 16, 2014 7:42 pm

Doing what is suggested seems to do the trick pretty well, i think?

  1. \documentclass[a5paper, openany, 10pt]{book}
  2. \usepackage{fontspec}
  3. \newfontfamily\greekfont[Mapping=TeX]{GFSDidot_Classic.otf}
  4. \usepackage{polyglossia}
  5. \setmainlanguage[variant=poly]{greek}
  6.  
  7. \begin{document}
  8. \greekfont
  9. Ἤμουν στὸ σπίτι μου ἐγὼ.
  10. \end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm

Postby AleCes » Tue Feb 18, 2014 12:56 am

Hello Johannes_B!

Actually, the error message says the font doesn't have a Greek typeface, no?
Anyway, thanks for the tip! ;)


Return to “Fonts & Character Sets”

Who is online

Users browsing this forum: No registered users and 1 guest