Unlock instant, AI-driven research and patent intelligence for your innovation.

Method and device for adjusting text size for page rendering

A text size and font size technology, applied in the computer field, can solve problems such as text adaptation deviation

Active Publication Date: 2021-01-01
WUHAN DOUYU NETWORK TECH CO LTD
View PDF6 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] Embodiments of the present invention provide a method and device for adjusting text size for page rendering to solve the technical problem of deviation in text adaptation during page rendering in the prior art

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
  • Method and device for adjusting text size for page rendering
  • Method and device for adjusting text size for page rendering
  • Method and device for adjusting text size for page rendering

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0058]The first aspect of the present invention provides a method for adjusting text size for page rendering, please refer to figure 1 . It should be noted that the mobile device of the method provided in this embodiment includes a mobile phone, a tablet computer, a smart watch or other devices equipped with an intelligent operating system, which is not specifically limited in the present invention. In addition, the operating system may be an Android system or other systems, and the present invention does not specifically limit this.

[0059] In order to make the description of Embodiment 1 clearer, it will be combined with figure 1 The implementation steps of the method provided by the embodiment of this application are introduced in detail.

[0060] First, step S101 is executed to acquire the screen width of the mobile device performing page rendering.

[0061] In the specific implementation process, the screen width of the mobile device is the width of the screen resolut...

Embodiment 2

[0081] This embodiment provides a text size adjustment device for page rendering, please refer to figure 2 , the device consists of:

[0082] The first acquiring module 201 acquires the screen width of the mobile device performing page rendering;

[0083] The second obtaining module 202 is used to obtain the ratio of the screen width of the mobile device to the width of the preset design draft;

[0084] The third obtaining module 203 is used to obtain the range of the first character size of the preset design draft;

[0085] An adjustment module 204, configured to adjust a second character size corresponding to the screen width according to the range of the first character size and the ratio;

[0086] The rendering module 205 is configured to perform page rendering according to the second text size.

[0087] In the device for adjusting text size for page rendering provided in this embodiment, the first text size of the preset design draft ranges from 12px to 44px, and the ...

Embodiment 3

[0097] This embodiment provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the following steps are implemented:

[0098] Obtain the screen width of the mobile device for page rendering;

[0099] Obtain the ratio of the screen width of the mobile device to the width of the preset design draft;

[0100] Obtain the range of the first character size of the preset design draft;

[0101] adjusting a second character size corresponding to the screen width according to the range of the first character size and the ratio;

[0102] Perform page rendering according to the second text size.

[0103] aforementioned figure 1Various variations and specific examples of the method for adjusting text size for page rendering in the embodiment are also applicable to the computer-readable storage medium in this embodiment. Through the foregoing detailed description of the method for adjusting text size for page ren...

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 embodiment of the invention provides a method and a device used for text size adjustment of page rendering. The method comprises the steps of obtaining the screen width of a mobile device which performs the page rendering; obtaining a ratio of the screen width of the mobile device to the width of a preset design draft; obtaining the scope of a first text size of the preset design draft; adjusting a second text size corresponding to the screen width based on the scope of the first text size and the ratio; and performing page rendering based on the second text size. The method and the deviceused for text size adjustment of page rendering solve the problem in the prior art that text adaption deviation exits during page rendering.

Description

technical field [0001] The present invention relates to the field of computer technology, in particular to a method and device for adjusting the size of text for page rendering. Background technique [0002] Currently, the Android operating system is widely used in various mobile devices due to its open source and good operability. In the Android system, page rendering is usually performed through a dynamic literal scripting language JavaScript. [0003] In the prior art, in page rendering, a rem adaptation method is generally adopted, wherein rem refers to a unit relative to the font size of the root element. However, there are many types of mobile devices, such as mobile phones, tablet computers, etc., and there are various types of browsers in various mobile devices, such as IE browser, Google browser, 360 browser, etc. The processing mechanism of rem is inconsistent. Some use rounding, and some use tail-removing method to keep only integers, etc., which will lead to de...

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 Patents(China)
IPC IPC(8): G06F16/957
Inventor 王亚伟陈少杰张文明
Owner WUHAN DOUYU NETWORK TECH CO LTD