def get_fontdef_for_locale(locale): """Returns path to the fontdef file for a locale. Unifont is default.""" fontdef_file = FONTDEFS.get(locale, 'unifont') return u'content/fonts/{filename}.fontdef'.format(filename = fontdef_file)
def get_fontdef_for_locale(locale): """Returns path to the fontdef file for a locale. Unifont is default.""" fontdef_file = FONTDEFS.get(locale, 'unifont') return os.path.join('content', 'fonts', u'{0}.fontdef'.format(fontdef_file))
def get_fontdef_for_locale(locale): """Returns path to the fontdef file for a locale. Unifont is default.""" fontdef_file = FONTDEFS.get(locale, 'unifont') return u'content/fonts/{filename}.fontdef'.format(filename=fontdef_file)
def get_fontdef_for_locale(locale): """Returns path to the fontdef file for a locale. Libertine is default.""" fontdef_file = "libertine" if locale in FONTDEFS.iterkeys(): fontdef_file = FONTDEFS[locale] return u"content/fonts/{filename}.fontdef".format(filename=fontdef_file)