Adaptive Text Scaling Using Cached Width and Font Data

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing adaptive text fixing methods require significant computational performance and are prone to calculation errors, leading to inconsistent performance across different sites during site expansion, thus decreasing efficiency.

Innovation Solution

A method that monitors content change events for text nodes, determines actual font information, calculates font size variation, and uses a scaling ratio formula to adaptively adjust text, reducing computational performance consumption and improving accuracy.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If boundary testing is used to obtain final text scaling value, then text scaling accuracy is improved, but computational performance consumption increases significantly

Engineering Contradiction:
Improvetext scaling accuracyVSAvoidcomputational performance consumption
Core Design Contradiction:
Measurement precisionVSUse of energy by moving object

Solution Approach 1:

The patent pre-calculates and stores text width data in a cache during the initialization phase, before actual text rendering is needed. This preliminary action eliminates the need for repeated boundary testing during runtime, significantly reducing computational performance consumption while maintaining text scaling accuracy.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent creates a simplified copy of text width information that can be stored and reused without performing full boundary testing calculations. By copying and caching essential text measurement data, the system avoids repeated complex computations while preserving the accuracy needed for proper text scaling.

Inventive Principle:
Principle #26Copying

2Measurement precision

If boundary testing is used for adaptive text fixing, then text fixing accuracy is improved, but calculation errors increase due to numerous calculations

Engineering Contradiction:
Improvetext fixing accuracyVSAvoidcalculation error rate
Core Design Contradiction:
Measurement precisionVSReliability

Solution Approach 1:

The patent performs text width measurements and stores results in advance, before actual text fixing is required. This preliminary calculation approach reduces the number of calculations needed during runtime, thereby reducing the likelihood of calculation errors while maintaining text fixing accuracy.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent implements a caching mechanism that provides feedback by storing previously calculated text width values. When the same text needs to be measured again, the cached value is retrieved instead of recalculating, reducing calculation errors and improving reliability.

Inventive Principle:
Principle #23Feedback

3Adaptability or versatility

If fixing code is written for different online scenarios, then adaptability to various scenarios is improved, but device complexity increases

Engineering Contradiction:
Improvescenario adaptabilityVSAvoidfixing code complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent implements a universal text measurement and caching mechanism that can handle multiple online scenarios through a single unified approach. Instead of writing separate fixing code for different scenarios, the system uses a general-purpose caching strategy that adapts to various text rendering situations, thereby reducing code complexity while maintaining scenario adaptability.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The patent adjusts text rendering parameters based on cached width information rather than using different fixing codes for different scenarios. By changing and reusing parameters like text width and scaling factors from the cache, the system achieves scenario adaptability with simpler, more consistent code.

Inventive Principle:
Principle #35Parameter changes

4Measurement precision

If dozens of calculations are performed for single line of text, then text scaling precision is improved, but productivity decreases due to time consumption

Engineering Contradiction:
Improvetext scaling precisionVSAvoidtext processing efficiency
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The patent calculates and caches text width values in advance, before they are actually needed for text rendering or scaling. This preliminary calculation eliminates the need to perform dozens of calculations during runtime, significantly improving text processing efficiency while maintaining scaling precision through cached reference values.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent creates and stores copies of text measurement data that can be quickly retrieved and reused. Instead of performing repeated complex calculations for each text rendering operation, the system copies and uses pre-calculated width values from cache, dramatically improving productivity while preserving text scaling precision.

Inventive Principle:
Principle #26Copying

Data Source

PatentUS20260073118A1Text adjustment method and products thereof
Publication Date: 2026.03.12 GUANGZHOU XIYIN INT IMPORT & EXPORT CO LTD
  • US20260073118A1 patent drawing
  • US20260073118A1 patent drawing
  • US20260073118A1 patent drawing

AI summary

A text adjustment method includes monitoring content change events for each text node, if a content change event is detected, obtaining actual font information of the updated text in a text node where the content change event occurred, and determining an actual text width of the updated text based on the actual font information, determining a font size variation based on the actual font information and user-input expected configuration information, determining a target scaling ratio for the updated text based on the actual font information, the actual text width, the font size variation, and the expected configuration information. Efficient and convenient adaptive scaling and fixing of text is enabled, computational performance consumption is reduced, text fixing accuracy is improved, and, thus, the efficiency of site expansion is enhanced.