Supercharge Your Innovation With Domain-Expert AI Agents!

Character width self-adaption method and device, terminal and storage medium

A technology of character width and storage medium, which is applied in digital data processing, special data processing applications, natural language data processing, etc. It can solve problems such as unfavorable maintenance, increased development costs, and code changes, so as to facilitate subsequent maintenance and reduce development. cost effect

Pending Publication Date: 2021-12-17
济南浪潮数据技术有限公司
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

This will lead to frequent code changes, increase development costs, and is not conducive to subsequent maintenance

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Character width self-adaption method and device, terminal and storage medium
  • Character width self-adaption method and device, terminal and storage medium
  • Character width self-adaption method and device, terminal and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0051] like figure 1 The method of the present flow diagram of a width of the adaptive embodiment of a text provided, comprising the steps of embodiment shown.

[0052] S101, to find all the required adaptive character width, and acquires the width of the respective adaptation needs text font attributes;

[0053] S102, according to the width of the respective adaptive required text font attributes, obtain all the text font attributes maximum actual width of the maximum actual width of the text obtained as an adaptive values;

[0054] S103, all the required width of the adaptive character width is set to the adaptive DOM label width value acquired.

[0055] Incidentally, DOM text width, i.e. the width of the label text.

[0056]An adaptive writing method according to a first embodiment of the present width, all required for the adaptive character width, the actual width of the text obtained in the actual width of the maximum width as an adaptive value, and all the required adaptive...

Embodiment 2

[0058] Considering the need for easy to find an adaptive character width, an adaptive writing method according to a second embodiment of the present width, text width preset adaptive need relevant identifier, the subsequent need to find out the adaptive character width according to the identification .

[0059] like figure 2 Present a schematic flowchart of an adaptive writing method according to a second width, comprising the steps of embodiment shown.

[0060] S201, when the initial development of the rules will require all adaptive width of the text using the font property parcel label, the label font style definition of the label attribute adaptive width.

[0061] S202, all text to find the required width of the label according to the adaptive style font property of the label.

[0062] That tag label style font attribute adaptive character width is needed is an adaptive character width.

[0063] S203, obtaining the individual need adaptive DOM text label width.

[0064] DOM to...

Embodiment 3

[0072] An adaptive writing method according to a third embodiment of the present width, the maximum width of the text in all of the adaptive character as the actual width of the adaptive value width, each character needs to obtain the actual width adaptive character width, the present embodiment creates a new font property tag, based on the individual needs of the new set of adaptive character width font property label, obtains the actual width of the new font property tag, so as to obtain the actual width of each character width required adaptation.

[0073] In particular, be processed according to the text font attributes, obtain all the properties of the font maximum width of the actual text, comprising the steps of:

[0074] Step one, create a new font attribute label;

[0075] Step two, turn each font property required width adaptive to the new text font attributes tag and the corresponding need for adaptation of the width of the text added to the contents of the new font pro...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a character width self-adaption method and device, a terminal and a storage medium, and the method comprises the steps: finding out all characters needing the self-adaption width, and obtaining the font attribute of each character needing the self-adaption width; according to the font attributes of the characters needing the self-adaptive width, obtaining the maximum actual character width in all the font attributes, and setting the obtained maximum actual character width as a self-adaptive width value; and setting the DOM label width of all the characters needing the self-adaptive width as the obtained self-adaptive width value. When characters, multiple languages are switched or scenes are changed, the widths of the DOM labels needing the characters with the self-adaptive width can be automatically adjusted, no matter how the characters change, the DOM labels are always displayed with the optimal width, developers do not need to change codes, the development cost is reduced, and follow-up maintenance is facilitated.

Description

Technical field [0001] The present invention relates to the field of the HTML page character width, particularly relates to an adaptive method of file width, apparatus, a terminal and a storage medium. Background technique [0002] At present, web development process in a variety of display elemental form (for example, name: Joe Smith; Age: 20; worked Units: XX, XXX) when the content is generally used to all kinds of (name, age, worked for the unit) DOM label elements fixed-width mode, ensures that the text can all show, will not wrap. But if the subsequent increase in display or hide the content, multi-language switching, the width of the previously defined perhaps more satisfied with the scene, then developers will re-adjust the fixed width defined before, or even to give different according to different scenarios fixed width. This will lead to frequent changes in the code, increase development costs, is not conducive to ongoing maintenance. Inventive content [0003] To solve...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F40/109G06F16/958
CPCG06F40/109G06F16/958
Inventor 杨浩
Owner 济南浪潮数据技术有限公司
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More