Content Typesetting Using Movable Type Template for Rendering Size
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current typesetting methods are inefficient when dealing with large volumes of content, as they require measuring the size of each character, leading to prolonged waiting times for users.
Innovation Solution
A content typesetting method that utilizes a preset movable type template to determine rendering size information based on element types, allowing for efficient typesetting by avoiding the need to measure each content element individually, and includes modules for obtaining text elements, determining rendering sizes, and typesetting based on the template and style settings.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If the size of each character is measured individually after obtaining the read content, then the typesetting can be performed according to the size of each character, but the typesetting efficiency is relatively low when there are a lot of read contents, causing users to wait too long
Solution Approach 1:
The patent pre-calculates and stores the size information of each character in a movable type template before actual typesetting. When typesetting is needed, the system directly retrieves pre-computed character sizes from the template instead of measuring each character individually, thus maintaining measurement accuracy while dramatically improving typesetting efficiency for large volumes of content
Solution Approach 2:
The patent creates a movable type template that contains pre-computed size information for characters. This template acts as a reusable copy that can be applied multiple times during typesetting without needing to re-measure characters, thereby resolving the contradiction between precise measurement and efficient processing
2Manufacturing precision
If the size of each character is measured individually, then accurate rendering size can be obtained, but the calculation process becomes complex and time-consuming for large amounts of content
Solution Approach 1:
The system performs the complex size measurement calculation in advance and stores the results in a movable type template. During actual typesetting, the system simply retrieves pre-computed values rather than performing complex measurements again, thus maintaining rendering precision while reducing calculation process complexity
Solution Approach 2:
The movable type template serves as a self-contained repository of character size information that can be independently queried and applied during typesetting, eliminating the need for complex real-time measurement calculations and simplifying the overall processing system
Data Source
AI summary
Provided are a content typesetting method and apparatus, a computer device, and a storage medium. The method includes: acquiring each text element in content to be typeset as well as the element type of each text element (S101); determining rendering size information of each text element on the basis of the element type of each text element and a preset rendering size relationship between element types indicated by a movable character template (S102); and on the basis of the rendering size information of each text element and typesetting style setting information, typesetting the content to be typed (S103). The rendering size of each text element can be determined according to the element type, which avoids a process where the rendering size of each text element needs to be separately measured each time typesetting is performed, thereby improving the computation efficiency of rendering size, and improving typesetting efficiency.


