Proportional Font Text Display with Monospaced Matrix Alignment
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for displaying text using proportional fonts face challenges in readability and space efficiency when converting to monospaced fonts, leading to loss of author intent and comprehension due to misalignment and excessive space usage.
Innovation Solution
A computer-implemented method that determines and renders tokens within a monospaced matrix using the average or minimum width of proportional font characters, ensuring non-overlapping and optimal positioning to mimic monospaced text alignment.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If proportional font is used for text display, then readability and visual grouping are improved, but vertical alignment and monospaced positioning are lost
Solution Approach 1:
The text is segmented into tokens (words or character sequences) that are processed individually. Each token is positioned based on its starting index in the monospaced matrix, allowing proportional fonts to be used while maintaining alignment through systematic segmentation and positioning of text elements.
Solution Approach 2:
The invention changes the parameter of character width from variable (proportional font) to fixed (monospaced width Wm) for positioning calculations. By using the monospaced width as a reference parameter for determining starting positions, the system achieves vertical alignment while rendering with proportional fonts.
2Stability of the object's composition
If monospaced font is used for text display, then vertical alignment and monospaced positioning are maintained, but readability and visual grouping deteriorate
Solution Approach 1:
The invention changes the rendering parameter from monospaced to proportional font while maintaining the monospaced positioning parameter (starting position = starting index × monospaced width). This parameter separation allows the benefits of both font types to be combined.
3Ease of operation
If proportional font is used without monospaced positioning, then readability is improved, but space occupation and memory usage increase
Solution Approach 1:
By segmenting text into tokens and calculating starting positions based on monospaced width, the system optimizes space utilization. Tokens are positioned efficiently without excessive spacing, reducing overall space occupation while maintaining proportional font readability.
4Stability of the object's composition
If monospaced font conversion is applied to proportional font, then vertical alignment is maintained, but author intent and text formatting are lost
Solution Approach 1:
The invention changes only the positioning parameter (using monospaced width for calculation) while preserving the rendering parameter (proportional font). This selective parameter change maintains vertical alignment without converting the font itself, thus preserving author's formatting intent.
Data Source
Figure 1~2
Figure 3~4
Figure 5
AI summary
A computer-implemented method for displaying a source text with a proportional font, the method comprising: determining (301, 402) within the source text at least one token, wherein the token comprises one or more characters and wherein the tokens within the source text are separated by one or more separator characters; determining (302, 401) a width Wm for monospaced areas (n) to form a monospaced matrix (500); determining (301, 404) starting indices (ni) of the at least one token within the monospaced matrix (500); determining (303, 405) a starting position of the at least one token within the monospaced matrix (500) as a product of the starting index (ni) of the token and the width (Wm) of the monospaced area (n); and rendering (304, 406) the at least one token at its determined starting position (Xi) on screen using the proportional font.