22-10-2015 дата публикации
Номер: US20150301989A1
Принадлежит:
A system and method is illustrated for platform-independent rendering of a document in a web browser supporting a two-dimensional (2D) canvas. The system and method includes obtaining the document, wherein the document includes text characters, text elements, and associated style information including at least one font, determining that font metrics do not exist, and obtaining the font metrics for the at least one font, using the font metrics and the text elements to determine how the document is divided into page criteria, determining a font file does not exist, and obtaining the font file for the at least one font, and rendering the document by drawing glyphs associated with the text characters in the 2D canvas, using the font file and the page criteria, so that the at least one font and the page criteria are platform-independent. 1. A computer implemented method for platform-independent rendering of a document in a web browser supporting a two-dimensional (2D) canvas , comprising:obtaining the document, wherein the document includes text characters, text elements, and associated style information including at least one font;determining that font metrics do not exist, and obtaining the font metrics for the at least one font;using the font metrics and the text elements to determine how the document is divided into page criteria;determining a font file does not exist, and obtaining the font file for the at least one font; andrendering the document by drawing glyphs associated with the text characters in the 2D canvas, using the font file and the page criteria, so that the at least one font and the page criteria are platform-independent.2. The method of claim 1 , wherein the text elements include at least one of paragraphs claim 1 , spans claim 1 , and the text characters.3. The method of claim 2 , wherein the page criteria include at least one of glyphs claim 2 , text runs claim 2 , lines claim 2 , and pages.4. The method of claim 3 , wherein using the font metrics ...
Подробнее