Font Glyph Superset Serving via Trie Caching
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The inefficiency in serving advertisements and documents with non-Latin scripts due to the slow process of compiling entire glyph sets for fonts, especially when only a few characters are required, and the impracticality of caching subsets for various combinations.
Innovation Solution
Identifying and serving supersets of glyphs that cover multiple requests, which can be cached and reused, along with rules to balance cache capacity, compilation cost, look-up speed, and network latency, to optimize font file size and serving speed.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If the entire glyph set for a font is compiled, then all possible characters can be rendered, but the file size becomes large and serving speed decreases
Solution Approach 1:
The patent segments the complete glyph set into multiple subsets organized in a trie data structure. Each node in the trie represents a character, and paths from the root represent sequences of characters. This segmentation allows the system to serve only the necessary portion of the glyph set for a given request, reducing file size and improving serving speed while maintaining the ability to render any requested character combination.
2Speed
If subsets of glyphs are compiled for specific requests, then file size is reduced, but the subsets cannot be reused for subsequent requests with different symbols
Solution Approach 1:
The patent creates a universal trie data structure that serves multiple functions. The same trie structure can efficiently serve requests for different character combinations by traversing different paths. The structure is designed to handle various language scripts and character sequences uniformly, making it universally applicable to different rendering requests while maintaining efficiency through its hierarchical organization.
Solution Approach 2:
The patent performs preliminary organization of the glyph set into a trie structure during font compilation. This pre-processing arranges all possible character sequences in an optimized hierarchical format that enables fast lookup and efficient serving for any subset of characters. The preliminary action of structuring the data this way allows subsequent requests to be served quickly without requiring re-compilation.
3Loss of time
If cached subsets are created to avoid re-compilation, then serving speed improves, but the number of possible combinations makes caching impractical
Solution Approach 1:
The patent implements a nested hierarchical structure where the trie is organized with root nodes containing child nodes, which themselves contain further child nodes representing character sequences. This nesting allows the system to cache results at multiple levels of the hierarchy. When a character sequence is requested, the system can retrieve cached results from the most appropriate level, avoiding the need to cache and manage all possible character combinations separately.
4Adaptability or versatility
If non-Latin scripts are included in fonts, then language support is improved, but storage space occupation increases significantly
Solution Approach 1:
The patent extracts only the necessary characters from the complete glyph set based on the actual content that needs to be rendered. Instead of including all non-Latin script characters in the served font file, the system analyzes the text content, identifies the required characters, and extracts only those from the trie structure. This extraction dramatically reduces storage space while maintaining full language support for the specific content being rendered.
Data Source
Figure 1(a)~1(b)
Figure 2
Figure 3~4
AI summary
A computer-implemented method is disclosed which comprises the steps of receiving a request for glyphs, the request identifying a font and characters of the font that are required, and searching for at least one superset of glyphs that contain the required glyphs and are absent of other glyphs of the font. The method further operates so that, if at least one superset is found, it returns the or a selected superset in reply to the request. Otherwise, if at least one superset is not found, a superset of glyphs that contain the required glyphs is compiled and returned in reply to the request, and the new superset is stored in a cache. A system configured to perform said method steps is also disclosed.