Discussion:
[gs-bugs] [Bug 698835] - MuPDF - cannot load font face when the actually font file is exactly same to font description
b***@artifex.com
2017-12-28 07:06:38 UTC
Permalink
http://bugs.ghostscript.com/show_bug.cgi?id=698835

Bug ID: 698835
Summary: cannot load font face when the actually font file is
exactly same to font description
Product: MuPDF
Version: 1.12
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: P4
Component: epub
Assignee: mupdf-***@artifex.com
Reporter: ***@gmail.com
QA Contact: gs-***@ghostscript.com
Word Size: ---

It is quite common that bold and italic are ignored when epubs are generated.
So I propose to use the embedded of local font with same name if cannot find
exactly same font with bold or italic style. It is always better to use book
author's font file.


in mupdf/html-font.c:

fz_load_html_font(fz_context *ctx, fz_html_font_set *set, const char *family,
int is_bold, int is_italic)
{
fz_html_font_face *custom;
const unsigned char *data;
int size;

for (custom = set->custom; custom; custom = custom->next)
{
if (!strcmp(family, custom->family) &&
is_bold == custom->is_bold &&
is_italic == custom->is_italic)
{
return custom->font;
}
+ else if (!strcmp(family, custom->family) &&
+ is_italic == custom->is_italic))
+ {
+ return custom->font;
+ }
+ else if (!strcmp(family, custom->family) &&
+ is_italic == custom->is_bold))
+ {
+ return custom->font;
+ }
+ else if (!strcmp(family, custom->family))
+ {
+ return custom->font;
+ }
}
--
You are receiving this mail because:
You are the QA Contact for the bug.
b***@artifex.com
2017-12-28 07:07:52 UTC
Permalink
http://bugs.ghostscript.com/show_bug.cgi?id=698835

Frank <***@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Summary|cannot load font face when |cannot load font face when
|the actually font file is |the actually font file is
|exactly same to font |not exactly same to font
|description |description
--
You are receiving this mail because:
You are the QA Contact for the bug.
Loading...