Sumatra PDF is a PDF, ePub, MOBI, CHM, XPS, DjVu, CBZ, CBR reader for Windows

Having e-book character / alternative font / letter problems

i try to customize the fonts, but i can’t use fonts with spaces in their names, for example:
Comic Sans will not work
Arial does work
i have tried everything i could think of, doing it with spaces, doing it without spaces, using the _ character as spaces, i have not gotten any results, please help

@sergei_vlaskov

Please note the Font name is intended only for e-pub files
the name you need is Comic Sans MS

i did what you said and my problem was solved, thank you!

Glad to help
Your Welcome

My SumatraPDF default font Georgia.
When I read file epub, I got an error font vietnamese. But my file MS Word don’t error font for vietnamese? Why???

What is the exact error shown? Please attach a screenshot if possible.

Can you share the EPUB in question?

The font Georgia is biased towards “western” characters and may not have suitable glyphs for CJK (Eastern) characters so may be showing boxes or even incorrect characters

There are many eastern fonts that may be better as a default for your needs and often I will replace the entry with “sim sun” or similar for testing.

The problem is to find one that’s the best fit for your language + the authors language + your visual taste

  1. Georgia supports codepages for European countries (using Latin, Greek or Cyrillic scripts). If anyone doesn’t like Times New Roman or FreeSerif, Cambria also supports Vietnamese codepage (and Armenian script and many special characters).
  2. Vietnamese currently uses Latin-based alphabet, not CJK. However, Han (classical Chinese) and Chữ Nôm (previous Chinese-based writing system) may be still in use.
1 Like

If you contrast the background with foreground of attached image, Sumatra seems to be having trouble rendering non-standard letter, note, for example, the heading “Tyre and Sidon”, the latter word is replaced by a square box. Note same title in Icecream reader, which, although I use, I prefer Sumatra. Also, the word 'Hiram" is missing the first letter in Sumatra. In both cases here there is a diacritic below the letter ignored by Sumatra

SumatraPDF is in e-book mode where it essentially uses one font
Often a font is not specified within an e-book since it is down to the characters built into a device. However it requires that the glyphs be available In whichever font is in use.

Here I have simply used Arial as a replacement in the advanced settings for the default of Georgia with these letters. (other system fonts in your PC may be more suited to other locale based material)

EbookUI [
	FontName = Arial
	FontSize = 13
	TextColor = #5f4b32
	BackgroundColor = #fbf0d9
	UseFixedPageUI = false

Georgia image
Arial, Calibri or Segoe UI image
Note that Usher suggests you could try
Cambria image

Thanks for those suggestions. I tried Arial which rendered the recalcitrant letters correctly, but it’s not as easy a font on the eyes for screen reading. So I’ve tried the serif font, Cambria, and I prefer that to ease eye strain. And it renders those odd non-standard letters/diacritics correctly too. Thanks to everyone. It would be nice if this was made a little easier to do, however. Especially if people are a bit frightened by manually changing things. But, all is good.

As far as I’ve been able to find, Sumatra is the only ebook reader that allows one to set the font that an epub is rendered in (which should be a simple thing!). I have some otf fonts that I’d like to use (Garamond Premier Pro, Gill Sans MT Pro, Myriad Pro, etc.). It’s a mystery how to find the exact name of a font that will work with "FontName = ". For example, I’ve tried every variation of “Garamond Premier Pro” that I can think of, to no avail. Also, it would be nice if I could set serif and sans fonts separately, but this doesn’t seem to be possible. How do I find the proper FontNames to use in SumatraPDF-settings.txt?

AFAIK it is usually (but not always) whatever Windows font installer has set it to. I often use Notepad font pulldown to get a clue. Note it is only Font: (family) that you can set. NOT style: such as Bold (unless that is in the family name)


SumatraPDf will depending on source usually apply a few styles of
Bold
Italic / Oblique
Monospaced usually as a courier fixed width style seen here
image

Back to your original question It depends on the Font Source how it is named so although Windows SHOWS Garamond Premier Pro as Name look in the font file for any OTF difference so here we see that it internally sets Garamond Premr Pro as its Font meme: (how obtuse is that !)

NOTE it is NOT the Font “Full name” as shown in the font window header above or font details in windows font settings where we can see the spaces are not shown but it may serve as a hint !

Possibly %windir%\system32\charmap.exe is the best guide for the usable name
image

Note again that SumatraPDF may not apply Font names with styles as expected so if your Gill Sans MT is Medium Italic but not defined well then SumatraPDF will often apply a default Upright Font however if the Italics are well defined as a native feature such as in MV Boli they will be seen as such


Again windows Font names can mislead for Font Faces (Regular / Italic / Bold etc)
This is also Garamond Premr Pro (however note it is now the Italic Face)

This should also be Garamond Premr Pro SmbdIt (SemiBoldItalic but clearly is not)

So in summary you can vary Size (controls the default lineheight)
but there is no sure fired way to know how a font will present itself in SumatraPDF
It will usually work with the Family Names as seen in Character Map
It will apply Regular Bold Italic and Underlined variations to any that successfully load
as either a Normal (Upright) or Oblique Face in a Font Family but not necessarily by name.
So unlike a word processor it is not generally possible to say use a given weight and style
Much depends on the Family default characteristics, such as leading (white space) between lines of type.

While we are using this file there are other font considerations, here it is in MuPdf rather than SumatraPDFs own engine.
image
Differences of note are the stronger difference in SumatraPDF between heading and body text. SumatraPDF does not honour the Drop Cap (Larger Initial Letter), all characters are kept same height, however that means that there is introduced extra whitespace after the initial character that will mean in Fixed UI the word “Here” becomes broken as “H ere” so won’t work with a simple “Find” entry. Small differences that should not affect readers, but a bugger for cut’n’pasters so may often be commented on.

Thank you! That is what I needed to know except—it only seems to work with True Type fonts. When I set FontName to the name of any Open Type font, I get Arial. Do you have any idea why that is?

Can you provide examples of font names that don’t work?

Garamond Premr Pro
Adobe Garamond Pro
Garamond Premier Pro Caption
Gill Sans MT Pro
Sanvito Pro
Poetica Std
Bauer Bodoni Std 2
Bembo Std
all fail.
I notice that the following, though Open Type, do work:
Palatino Linotype
Times New Roman
Doulos SIL

@Michael_Saunders
As I tried to explain there can be a few separate problems with setting font names.

  1. when fonts are from non standard resources, it can be more problematic to determine their name, I too find NON TTF (e.g. OTF) more difficult to “nominate”. That may be for more than one reason since Digital Rights may also be at play.
  2. Even it the NAME is addressable the file structure may may not be right and font substitution can then kick in I saw that above with my different sourced styles of suspect Garamond Premr Pro. The naming worked for some styles but not others.

SumatraPDF uses libraries such as freetype and it could be they may not work well with less regular styles like “Black” (i.e. Bauer Bodoni Std 2) As to why a regular style such as Bembo Std does not work I have not been able to see any common reason
Here is Bembo Std in my system

and if I snip a section of that text then that sample is identified as a Bembo family member by WTF (WhatTheFont)
image image

The above was an OTF font which worked well
and as you note TTF can be easier so its worth finding equivalents

Like other similar system file loading issues, it sometimes helps to refresh a resident resource installation, which may, at its most extreme, require uninstall all variants-reinstall just one>test>uninstall 1-reboot-reinstall 1-test>reboot-test (much more trouble than most users would even consider and most frequently makes no difference)

Were you able to get any Garamond font working for epub?

No. I also tried EBGaramond and Jost*. I tried looking up names with Font Forge, etc. No success.