Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDF Export does not support multiple embedded fonts for a single HTML element #3394

Closed
dimodi opened this issue Jul 10, 2017 · 2 comments
Closed

Comments

@dimodi
Copy link
Contributor

dimodi commented Jul 10, 2017

(@mishoo, this is more like a question, rather than a bug report. We are not sure if a solution is available)

Description

PDF Export does not support multiple embedded fonts for a single HTML element, if the characters from this element use multiple fonts in the browser.

Reproduction of the problem

Imagine a Kendo UI widget, which displays content in multiple languages, and multiple font files, which contain all these languages, but no single font file contains all of them.

.k-grid {
    font-family: "DroidSansFallback", "Noto Sans Ethiopic", " Noto Sans Ethiopic Bold", "Arial", sans-serif;
}

Current behavior

Only one font will be picked and embedded in the PDF document (DroidSansFallback). As a result, all glyphs that are not provided by this font (but are provided in other fonts, e.g. Noto Sans Ethiopic) will not be displayed.

Expected/desired behavior

Embed all fonts and glyph definitions that are required to display the text, similar to how the browser works:

https://developer.mozilla.org/en/docs/Web/CSS/font-family

Note: The font-family property specifies a list of fonts, from highest priority to lowest. Font selection does not simply stop at the first font in the list that is on the user's system. Rather, font selection is done one character at a time, so that if an available font does not have a glyph for a needed character, the latter fonts are tried. (However, this doesn't work in Internet Explorer 6 or earlier.) When a font is only available in some styles, variants, or sizes, those properties may also influence which font family is chosen.

Is this possible with the Kendo UI PDF export?

Environment

  • Kendo UI version: 2017.2.621
@mishoo
Copy link
Contributor

mishoo commented Jul 11, 2017

Nope, currently there is no solution for this. We can't pick up glyphs from multiple fonts for a single element.

@dimodi
Copy link
Contributor Author

dimodi commented Jul 11, 2017

Thanks @mishoo .

@dimodi dimodi closed this as completed Jul 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants