CN105791524B - A kind of method and device adjusting page font - Google Patents

A kind of method and device adjusting page font Download PDF

Info

Publication number
CN105791524B
CN105791524B CN201410823277.4A CN201410823277A CN105791524B CN 105791524 B CN105791524 B CN 105791524B CN 201410823277 A CN201410823277 A CN 201410823277A CN 105791524 B CN105791524 B CN 105791524B
Authority
CN
China
Prior art keywords
page
font size
main body
font
text
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201410823277.4A
Other languages
Chinese (zh)
Other versions
CN105791524A (en
Inventor
梁捷
蔡锐劝
胡立琼
贺永明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba China Co Ltd
Original Assignee
Guangzhou Dongjing Computer Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Dongjing Computer Technology Co Ltd filed Critical Guangzhou Dongjing Computer Technology Co Ltd
Priority to CN201410823277.4A priority Critical patent/CN105791524B/en
Publication of CN105791524A publication Critical patent/CN105791524A/en
Application granted granted Critical
Publication of CN105791524B publication Critical patent/CN105791524B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Telephone Function (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Document Processing Apparatus (AREA)

Abstract

This application discloses a kind of method and devices for adjusting page font.Wherein, it the described method comprises the following steps: obtaining the main body font size of the page, wherein main body font size is the font size that number of words is most in the page;Scaling is calculated according to the main body font size and default font size;The font in the page is adjusted by the scaling.Above scheme, the font size of font in current page can be adjusted to be suitble to the font size read, so that it is less than normal inconvenient to user's browsing pages bring to reduce page font size, and prevent the page after amplification font size from the case where scroll bar occur, and the continuity of browsing is improved, easily facilitate user's reading.

Description

A kind of method and device adjusting page font
Technical field
This application involves the communications field, especially a kind of method and device for adjusting page font.
Background technique
Currently, still there is many mobile phone websites to have the simplified version page.Usually searched in 2G network environment or by search engine When the page, the simplified version page is entered.However, the font size for the text that the simplified version page is included is generally No. 12-14, font size is less than normal not Conducive to reading, and same webpage or the font size of different web pages are not of uniform size, cause user that can feel font size when browsing webpage It is suddenly big or suddenly small.
For font size problem less than normal, common solution is: passing through scaling page ratio or setting browser word Number.
The method for adjusting page font size by scaling page ratio are as follows: user is by double-clicking the page to adjust the scaling of the page Ratio, so that full page is integrally amplified.However, after the page is by whole amplify, it may appear that horizontal scroll bar, user The scroll bar that horizontally slips is needed in browsing pages.
The method for adjusting page font size by setting browser font size are as follows: by the way that a global font size amplification ratio is arranged Example, all page font sizes are amplified by the global font size of setting.However, due to all pages press global font size into Row amplification, therefore, will lead in the same page, be suitble to the amplified problem bigger than normal of font of font size read originally;And When the font size of the different pages is different, when user browses the font size page less than normal, the font size by the way that the overall situation is arranged amplifies the page To after the font size of suitable reading, when then browsing font size is suitble to another page read, the former word for being suitble to reading originally will lead to Number font it is amplified bigger than normal, again readjust font size the problem of.
Summary of the invention
The application provides a kind of method and device for adjusting page font, can be by the font size tune of the font in current page Whole is to be enlarged into the font size for being suitble to reading, to reduce, page font size is less than normal to give the inconvenience of user's browsing pages bring, Yi Jifang There is the case where scroll bar in the page after only amplifying main body font size, and improves the continuity of browsing, easily facilitates user's reading.
In order to solve the above technical problems, the technical solution that the application uses is: providing a kind of adjustment page font Method, described method includes following steps: obtaining the main body font size of the page, wherein main body font size be the page in number of words most More font sizes;Scaling is calculated according to the main body font size and default font size;By the scaling in the page Font be adjusted.
Wherein, the step of obtaining the main body font size of the page includes: to judge whether the page is the simplified version page;When the page When face is the simplified version page, the main body font size of the page is obtained.
Wherein, the step of obtaining the main body font size of the page specifically: in the predetermined fraction for obtaining the simplified version page The most font size of number of words, and the font size is identified as main body font size.
Wherein, the step of obtaining the main body font size of the page specifically: it is most to obtain number of words in the simplified version page The font size is identified as main body font size when the font size belongs to a pre-set interval by font size.
Wherein, judge that the step of whether page is the simplified version page includes: to judge that the number of words of the text of the page is It is no to be greater than the first preset value, and/or judge whether the number of words of the text of the page is greater than the second preset value and the page Whether text only has a kind of font size;When the number of words of the text of the page is greater than the first preset value, and/or the text when the page When this number of words only has a kind of font size greater than the text of the second preset value and the page, the page is identified as simplified version page Face.
Wherein, described that the step of whether page is the simplified version page judged further include: to judge whether the page does not belong to In 5 webpage of picture and text webpage and/or HTML;When the page is not belonging to 5 webpage of picture and text webpage and/or HTML, described in judgement The page is the simplified version page.
In order to solve the above technical problems, the technical solution that the application uses is: providing a kind of adjustment page font Device, described device include obtaining module, computing module and control module;The main body for obtaining module and being used to obtain the page Font size, wherein main body font size is the font size that number of words is most in the page;The computing module is used for according to the main body font size And default font size calculates scaling;The adjustment module is used to carry out the font in the page by the scaling Adjustment.
Wherein, the acquisition module includes judging unit and acquiring unit;The judging unit is for judging the page Whether face is the simplified version page;The acquiring unit is used to obtain the main body character of the page when the page is the simplified version page Number.
Wherein, the judgment module is specifically used for judging whether the page is the simplified version page, when the page is simplified version When the page, it is judged as that the main body font size needs to amplify.
Wherein, the judging unit is specifically used for when the page meets combinations one or more in preset condition, The page is identified as the simplified version page, wherein the preset condition includes: that the number of words of the text of the page is greater than first in advance If value, the number of words of the text of the page is greater than the second preset value and the text of the page only has a kind of font size, the page It is not belonging to 5 webpage of picture and text webpage and/or HTML, the type for the font size that the page includes is less than preset upper limit threshold.
Above scheme, the main body font size for the page that mobile terminal is currently browsed by acquisition user, according to the main body character Number and default font size calculate scaling, and the font in the page is adjusted by the scaling, can will The font size of current page text is enlarged into the font size for being suitble to reading, to reduce, page font size is less than normal to be brought to user's browsing pages Inconvenience.In addition, can prevent the page after the font size of amplification font from going out by carrying out typesetting again to the page after adjustment font size The case where existing scroll bar, easily facilitates user's reading.
Detailed description of the invention
Fig. 1 is the flow chart for one embodiment of method that the application adjusts page font;
Fig. 2 is the flow chart for another embodiment of method that the application adjusts page font;
Fig. 3 is the structural schematic diagram for one embodiment of device that the application adjusts page font;
Fig. 4 is the structural schematic diagram for another embodiment of device that the application adjusts page font.
Specific embodiment
In being described below, for illustration and not for limitation, propose such as specific system structure, interface, technology it The detail of class, so as to provide a thorough understanding of the present application.
Refering to fig. 1, Fig. 1 is the flow chart for one embodiment of method that the application adjusts page font.Present embodiment Executing subject is mobile terminal, and mobile terminal can be mobile phone, or Portable movable of the screen size less than 6 inches is whole End.Present embodiment adjustment page font method the following steps are included:
S101: the main body font size of the page is obtained, wherein main body font size is the font size that number of words is most in the page.
When user browses webpage by the browser of mobile terminal, mobile terminal is obtained from the page that user currently browses Take the main body font size of the page.Wherein, main body font size is the font size that number of words is most in the page.The page can be any of user's browsing The page, for example, the simplified version page, picture and text webpage, 5 webpage of HTML etc., without limitation.
Wherein, picture and text webpage is mainly to show that the number of words for having the following characteristics that picture and text webpage includes is general as the main purpose Within 300 words, the quantity of effective picture be generally more than 5.Effective picture can be more than 30 for the pixel of height or width Picture, or the picture tag under list tab.
Include the elements such as title, navigation, paragraph in HTML5 webpage.
S102: scaling is calculated according to the main body font size and default font size.
After acquisition for mobile terminal to the main body font size of the page, scaling is calculated according to main body font size and default font size. Wherein, the method for calculating the scaling is default font size divided by main body font size, and presetting font size is preset suitable browsing Font size.The font size of preset suitable browsing can be 16, or the arbitrary value among 15,15.5,16.5 or 17, but not It is limited to this, other values can also be set according to actual needs.
S103: the font in the page is adjusted by the scaling.
After mobile terminal calculates scaling, the font size of the font in the page is adjusted by scaling, just It is read in user.Wherein, the main body font size adjusted in the page is equal to the font size of preset suitable reading.
It is understood that in the present embodiment, be according in the page main body font size and default font size calculate contracting Ratio is put, then by the font in the scaling adjustment page calculated, the corresponding scaling of a page.
In other embodiments, can also according in the page every kind of font size and default font size to calculate every kind of font size each Self-corresponding scaling, and every kind of font is adjusted by corresponding scaling, so that all words adjusted The font size of body is consistent, and is default font size, can prevent the skimble-scamble situation of page font size size.Wherein, Every kind of font size and scaling correspond.
After the font to the page is adjusted, mobile terminal arranges the page also according to the display area of mobile terminal again The processing such as version, rendering prevent amplification font so that the text of the page after adjustment font size is suitble to the display area of mobile terminal There is the case where scroll bar in the page after font size.Typesetting is carried out to the page, the specific method of rendering does not repeat herein.
Above scheme, mobile terminal pass through the main body font size for obtaining the page, and according to main body font size and default font size meter Scaling is calculated, and the font in the page is adjusted by scaling, the font size of current page text can be enlarged into It is suitble to the font size read, so that it is less than normal inconvenient to user's browsing pages bring to reduce page font size.In addition, by adjustment word The page after number carries out typesetting again, can prevent the page after the font size of amplification font from the case where scroll bar occur, and improve clear The continuity look at easily facilitates user's reading.
Referring to Fig.2, Fig. 2 is the flow chart for another embodiment of method that the application adjusts page font.Present embodiment Executing subject be mobile terminal, mobile terminal can be mobile phone, or Portable movable of the screen size less than 6 inches Terminal.Present embodiment adjustment page font method the following steps are included:
S201: judge whether the page is the simplified version page.
Mobile terminal judges whether the page that user currently browses is the simplified version page.
Wherein, judge that the step of whether page is the simplified version page includes: to judge whether the number of words of the text of the page is greater than One preset value, and/or judge whether the number of words of the text of the page is greater than the second preset value and whether the text of the page is only a kind of Font size;When the page text number of words be greater than the first preset value, and/or when the page text number of words be greater than the second preset value and When the text of the page only has a kind of font size, which is identified as the simplified version page.
The step of whether page is the simplified version page judged further include: judge the page whether be not belonging to picture and text webpage and/or 5 webpage of HTML;When the page is not belonging to 5 webpage of picture and text webpage and/or HTML, which is identified as the simplified version page.
The step of whether page is the simplified version page judged further include: it is pre- to judge whether the type for the font size that the page includes is less than If upper limit threshold;When the type for the font size that the page includes is less than preset upper limit threshold, which is identified as simplified version page Face.
It is understood that current page meets one of preset condition or a variety of combinations in the above judgment method When, mobile terminal judges current page for the simplified version page.
For example, the number of words of the text of current page got when mobile terminal judgement be less than or equal to the second preset value and When the text of current page includes at least two font size, judging result is that current page is not the simplified version page.When mobile terminal is sentenced When the number of words of the text of the disconnected current page got only has a kind of font size greater than the text of the second preset value and current page, sentence Disconnected result is that current page is the simplified version page.Wherein, the second preset value is 60, and but it is not limited to this, can also be according to practical feelings Condition is set as other values.
When the number of words that mobile terminal judgement gets the text of current page is greater than the first preset value and current page When the number of words of text only has a kind of font size greater than the text of the second preset value and current page, judging result is that current page is letter The version page.
When mobile terminal judgement gets the quantity that the number of words that current page includes is less than or equal to 300 words, effective picture When less than or equal to 5, it is not the simplified version page that judging result, which is that current page is picture and text webpage,.When mobile terminal judgement is got When the number of words that current page includes is greater than 300 words, the quantity of effective picture is greater than 5, judging result is that current page is simplified version The page.Wherein, effective picture can be more than 30 picture for the pixel of height or width, or the picture under list tab Label.
When mobile terminal judgement, which gets current page, includes the elements such as title, navigation, paragraph, judging result is current The page is 5 webpage of HTML, and current page is not the simplified version page.When mobile terminal judgement get current page not comprising title, When the elements such as navigation, paragraph, judging result is that current page is the simplified version page.
When the type for the font size that the page that mobile terminal judgement is got includes is less than preset upper limit threshold, judge to tie Fruit is that current page is the simplified version page.Wherein, preset upper limit threshold is 4, and but it is not limited to this, can also be according to the actual situation It is set as other values.
When current page meets in the above judgment method one of preset condition or a variety of combinations, mobile terminal judgement Current page is the simplified version page.Wherein, preset condition includes: that the number of words of the text of current page is greater than the first preset value, currently The number of words of the text of the page is greater than the second preset value and the text of current page only has a kind of font size, and current page is not picture and text net Page, current page is not 5 webpage of HTML, neither picture and text webpage is also not 5 webpage of HTML, current page includes current page Font size type be less than preset upper limit threshold.
In the present embodiment, the first preset value is 300, and the second preset value is 60, and preset upper limit threshold is 4.At it In his embodiment, it can also be configured according to the actual situation.
Picture and text webpage mainly to show as the main purpose, does not need to amplify picture and text webpage in most cases.HTML 5 webpages, which generally compare, dazzles beautiful, and every kind of font size used in 5 webpage of HTML all represents special meaning, is not suitable for being put Greatly.
When mobile terminal judges that current page is the simplified version page, step S202 is executed.
It is without any processing when it is the simplified version page that mobile terminal, which judges current page not,.
In the present embodiment, without any processing to picture and text webpage, 5 webpage of HTML.In other embodiments, It can be set to zoom in or out the font in 5 webpage of the online article page and/or HTML.
S202: when the page is the simplified version page, the main body font size of the page is obtained.
When mobile terminal judges current page for the simplified version page, the main body font size of current page is obtained, main body font size is The most font size of number of words.
Wherein, the step of obtaining the main body font size of current page specifically: the font size that number of words is most in the simplified version page is obtained, And the font size is identified as main body font size.
For example, obtaining number of words in the predetermined fraction of current page when mobile terminal judges current page for the simplified version page Most font size, and the font size is identified as main body font size, wherein predetermined fraction is that 300 words before current page (but are not limited to This, can also be set as other values according to actual needs).
The step of obtaining the main body font size of current page can be with specifically: obtains the word that number of words is most in the simplified version page Number, when the font size belongs to a pre-set interval, which is identified as main body font size.
For example, the font size that number of words is most in current page is obtained when mobile terminal judges current page for the simplified version page, And be compared the font size with the maximum value of pre-set interval and minimum value, to judge whether the font size belongs to preset areas Between.
When the font size is greater than the minimum value of pre-set interval equal to the minimum value of pre-set interval or the font size and is less than default When the maximum value in section or the font size are equal to the minimum value of pre-set interval, judging result is that the font size belongs to a pre-set interval, will The font size is identified as main body font size, wherein pre-set interval be [12,14] (but not limited to this, can also set according to actual needs Other sections).
When the font size is less than the minimum value of pre-set interval or the font size is greater than the maximum value of pre-set interval, judging result It is not belonging to pre-set interval for the font size, does not need the font size for the font for adjusting the page, it is without any processing to the font size.
In the present embodiment, pre-set interval is [12,14], and the font for font size in the page less than 12 generally has spy Different meaning, font of the font size greater than 14 has been the font size for being suitble to read, and does not need to amplify.In other embodiments In, pre-set interval may be set to be other value ranges.
S203: scaling is calculated according to the main body font size and default font size.
After acquisition for mobile terminal to the main body font size of the page, scaling is calculated according to main body font size and default font size. Wherein, the method for calculating the scaling is default font size divided by main body font size, and presetting font size is preset suitable browsing Font size.The font size of preset suitable browsing can be 16, or the arbitrary value among 15,15.5,16.5 or 17, but not It is limited to this, other values can also be set according to actual needs.
S204: the font in the page is adjusted by the scaling.
After mobile terminal calculates scaling, the font size of the font in the page is adjusted by scaling, just It is read in user.Wherein, the main body font size adjusted in the page is equal to the font size of preset suitable reading.
It is understood that in the present embodiment, be according in the page main body font size and default font size calculate contracting Ratio is put, then by the font in the scaling adjustment page calculated, the corresponding scaling of a page.
In other embodiments, can also according in the page every kind of font size and default font size to calculate every kind of font size each Self-corresponding scaling, and every kind of font is adjusted by corresponding scaling, so that all words adjusted The font size of body is consistent, and is default font size, can prevent the skimble-scamble situation of page font size size.Wherein, Every kind of font size and scaling correspond.
After the font to the page is adjusted, mobile terminal arranges the page also according to the display area of mobile terminal again The processing such as version, rendering prevent amplification font so that the text of the page after adjustment font size is suitble to the display area of mobile terminal There is the case where scroll bar in the page after font size.Typesetting is carried out to the page, the specific method of rendering does not repeat herein.Present embodiment In, since the main body font size of the simplified version page typically belongs between [12,14], font size is less than normal, is not suitable for reading, therefore, to simplified version Font in the page is adjusted according to according to the scaling of main body font size and the calculating of default font size, so that word adjusted The font size of body is the font size for being suitble to browsing.
In other embodiments, when in the simplified version page including the font size greater than the font size of preset suitable browsing, also It can be to the font size for the font size for being greater than preset suitable browsing in the simplified version page, according to the corresponding scaling of every kind of font size It is reduced, so that the font size for being less than or greater than preset suitable reading is uniformly adjusted to the word of preset suitable reading Number.
Above scheme, mobile terminal, when the page is the simplified version page, are obtained by judging whether current page is the simplified version page The main body font size of current page is taken, and scaling is calculated according to main body font size and default font size, and by scaling to page Font in face is adjusted, and the font size of the font in current page can be enlarged into the font size for being suitble to reading, to reduce Page font size is less than normal inconvenient to user's browsing pages bring.In addition, by carrying out typesetting again to the page after adjustment font size, It can prevent the page after the font size of amplification font from the case where scroll bar occur, and improve the continuity of browsing, easily facilitate user It reads.
It is the structural schematic diagram for one embodiment of device that the application adjusts page font refering to Fig. 3, Fig. 3.This embodiment party The executing subject of formula is the device for adjusting page font, and the device of adjustment page font is mobile terminal, and mobile terminal can be Mobile phone, or portable mobile termianl of the screen size less than 6 inches.The end of adjustment page font in present embodiment Each module for being included is held to please refer to Fig. 1 for executing corresponding each step, concrete methods of realizing in the corresponding embodiment of Fig. 1 And its associated description of corresponding embodiment, it does not repeat herein.The device of the adjustment page font of present embodiment includes obtaining Modulus block 310, computing module 320 and adjustment module 330.
Obtain the main body font size that module 310 is used to obtain the page, wherein main body font size is the word that number of words is most in the page Number.For example, obtaining the main body font size that module 310 obtains the page, wherein the page is the page of user's browsing, based on main body font size Body font size is the font size number that number of words is most in the page.The information for obtaining the main body font size that module 310 will acquire is sent to calculating Module 320.
Computing module 320 is used to receive the information for obtaining the main body font size that module 310 is sent, according to main body font size and in advance If font size calculates scaling.For example, computing module 320 receives the information for obtaining the main body font size that module 310 is got, and root Scaling is calculated according to according to main body font size and default font size.Scaling is sent to adjustment module by computing module 320 330。
Adjustment module 330 is used to receive the scaling of the transmission of computing module 320, by scaling to the font in the page It is adjusted.For example, adjustment module 330 receives the scaling that computing module 320 is sent, by scaling to the word in the page Body is adjusted.
It is understood that in the present embodiment, be according in the page main body font size and default font size calculate contracting Ratio is put, then by the font in the scaling adjustment page calculated, the corresponding scaling of a page.
In other embodiments, can also according in the page every kind of font size and default font size to calculate every kind of font size each Self-corresponding scaling, and every kind of font is adjusted by corresponding scaling, so that all words adjusted The font size of body is consistent, and is default font size, can prevent the skimble-scamble situation of page font size size.Wherein, Every kind of font size and scaling correspond.
After the font to the page is adjusted, mobile terminal arranges the page also according to the display area of mobile terminal again The processing such as version, rendering prevent amplification font so that the text of the page after adjustment font size is suitble to the display area of mobile terminal There is the case where scroll bar in the page after font size.Typesetting is carried out to the page, the specific method of rendering does not repeat herein.
Above scheme, mobile terminal pass through the main body font size for obtaining the page, and according to main body font size and default font size meter Scaling is calculated, and the font in the page is adjusted by scaling, the font size of current page text can be enlarged into It is suitble to the font size read, so that it is less than normal inconvenient to user's browsing pages bring to reduce page font size.In addition, by adjustment word The page after number carries out typesetting again, can prevent the page after the font size of amplification font from the case where scroll bar occur, and improve clear The continuity look at easily facilitates user's reading.
It is the structural schematic diagram for one embodiment of device that the application adjusts page font refering to Fig. 4, Fig. 4.This embodiment party The executing subject of formula is the device for adjusting page font, and the device of adjustment page font is mobile terminal, and mobile terminal can be Mobile phone, or portable mobile termianl of the screen size less than 6 inches.The end of adjustment page font in present embodiment Each module for being included is held to please refer to Fig. 2 for executing corresponding each step, concrete methods of realizing in the corresponding embodiment of Fig. 2 And its associated description of corresponding embodiment, it does not repeat herein.The device of the adjustment page font of present embodiment includes obtaining Modulus block 310, computing module 320 and adjustment module 330, wherein obtain module 310 and include judging unit 311 and obtain Unit 312.
Judging unit 311 is for judging whether the page is the simplified version page.Wherein, judging unit 311 is specifically used for working as the page When meeting combinations one or more in preset condition, the page is identified as the simplified version page, wherein preset condition includes: the page The number of words of text be greater than the first preset value, the number of words of the text of the page is greater than the second preset value and the text of the page only has one kind Font size, the page are not belonging to 5 webpage of picture and text webpage and/or HTML, and the type for the font size that the page includes is less than preset upper limit threshold Value.
For example, judging unit 311 judges whether the page is the simplified version page.Wherein, when the page meets one kind in preset condition Or when a variety of combination, the page is identified as the simplified version page by judging unit 311, wherein preset condition includes: the text of the page Number of words is greater than the first preset value, and the number of words of the text of the page is greater than the second preset value and the text of the page only has a kind of font size, page Face is not belonging to 5 webpage of picture and text webpage and/or HTML, and the type for the font size that the page includes is less than preset upper limit threshold.
Judging result is sent to acquiring unit 312 by judging unit 311.
Acquiring unit 312 is used to receive the judging result of the transmission of judging unit 311, when the page is the simplified version page, obtains The main body font size of the page.Wherein, acquiring unit 312 is specifically used for the word that number of words is most in the predetermined fraction for obtaining the simplified version page Number, and font size is identified as main body font size.The font size most also particularly useful for number of words in the acquisition simplified version page of acquiring unit 312, When font size belongs to pre-set interval, font size is identified as main body font size.
For example, acquiring unit 312 receives the judging result that judging unit 311 is sent, it is simplified version when judging result is the page When the page, the main body font size of the page is obtained.Wherein, it is most to obtain number of words in the predetermined fraction of the simplified version page for acquiring unit 312 Font size, and font size is identified as main body font size.Alternatively, acquiring unit 312 obtains the font size that number of words is most in the simplified version page, work as word When number belonging to pre-set interval, font size is identified as main body font size.
The information for the main body font size that will acquire is sent to computing module 320 by acquiring unit 312.
Computing module 320 is used to receive the information for obtaining the main body font size that module 310 is sent, according to main body font size and in advance If font size calculates scaling.For example, computing module 320 receives the information for obtaining the main body font size that module 310 is got, and root Scaling is calculated according to according to main body font size and default font size.Scaling is sent to adjustment module by computing module 320 330。
Adjustment module 330 is used to receive the scaling of the transmission of computing module 320, by scaling to the font in the page It is adjusted.For example, adjustment module 330 receives the scaling that computing module 320 is sent, by scaling to the word in the page Body is adjusted.
After the font size of the font to the page is adjusted, display area pair of the unit for scaling 332 also according to mobile terminal Again typesetting, rendering etc. are handled the page, so that the text of the page after the font size of adjustment is suitble to the display area of mobile terminal, are prevented There is the case where scroll bar in the page after only amplifying the font size of font.Typesetting is carried out to the page, the specific method of rendering is not gone to live in the household of one's in-laws on getting married herein It states.
It is understood that in the present embodiment, be according in the page main body font size and default font size calculate contracting Ratio is put, then by the font in the scaling adjustment page calculated, the corresponding scaling of a page.
In other embodiments, can also according in the page every kind of font size and default font size to calculate every kind of font size each Self-corresponding scaling, and every kind of font is adjusted by corresponding scaling, so that all words adjusted The font size of body is consistent, and is default font size, can prevent the skimble-scamble situation of page font size size.Wherein, Every kind of font size and scaling correspond.
After the font to the page is adjusted, mobile terminal arranges the page also according to the display area of mobile terminal again The processing such as version, rendering prevent amplification font so that the text of the page after adjustment font size is suitble to the display area of mobile terminal There is the case where scroll bar in the page after font size.Typesetting is carried out to the page, the specific method of rendering does not repeat herein.Present embodiment In, since the main body font size of the simplified version page typically belongs between [12,14], font size is less than normal, is not suitable for reading, therefore, to simplified version Font in the page is adjusted according to according to the scaling of main body font size and the calculating of default font size, so that word adjusted The font size of body is the font size for being suitble to browsing.
In other embodiments, when in the simplified version page including the font size greater than the font size of preset suitable browsing, also It can be to the font size for the font size for being greater than preset suitable browsing in the simplified version page, according to the corresponding scaling of every kind of font size It is reduced, so that the font size for being less than or greater than preset suitable reading is uniformly adjusted to the word of preset suitable reading Number.
Above scheme, mobile terminal, when the page is the simplified version page, are obtained by judging whether current page is the simplified version page The main body font size of current page is taken, and scaling is calculated according to main body font size and default font size, and by scaling to page Font in face is adjusted, and the font size of the font in current page can be enlarged into the font size for being suitble to reading, to reduce Page font size is less than normal inconvenient to user's browsing pages bring.In addition, by carrying out typesetting again to the page after adjustment font size, It can prevent the page after the font size of amplification font from the case where scroll bar occur, and improve the continuity of browsing, easily facilitate user It reads.
In above description, for illustration and not for limitation, propose such as specific system structure, interface, technology it The detail of class, so as to provide a thorough understanding of the present application.However, it will be clear to one skilled in the art that there is no these specific The application also may be implemented in the other embodiment of details.In other situations, omit to well-known device, circuit with And the detailed description of method, so as not to obscure the description of the present application with unnecessary details.

Claims (10)

1. a kind of method for adjusting page font, which is characterized in that described method includes following steps:
Obtain the main body font size of the page, wherein main body font size is the font size that number of words is most in the page;
Scaling is calculated according to the main body font size and default font size;
The font in the page is adjusted by the scaling.
2. the method according to claim 1, wherein the step of obtaining the main body font size of the page includes: to judge institute State whether the page is the simplified version page;When the page is the simplified version page, the main body font size of the page is obtained.
3. according to the method described in claim 2, it is characterized in that, the step of obtaining the main body font size of the page specifically: The font size that number of words is most in the predetermined fraction of the simplified version page is obtained, and the font size is identified as main body font size.
4. according to the method described in claim 2, it is characterized in that, the step of obtaining the main body font size of the page specifically: The font size that number of words is most in the simplified version page is obtained, when the font size belongs to a pre-set interval, the font size is identified as Main body font size.
5. according to the method described in claim 2, it is characterized in that, judging the step of whether page is simplified version page packet It includes:
Judge whether the number of words of the text of the page is greater than the first preset value, and/or
Judge whether the number of words of the text of the page is greater than the second preset value and whether the text of the page only has a kind of word Number;
When the page text number of words be greater than the first preset value, and/or when the page text number of words be greater than second When the text of preset value and the page only has a kind of font size, the page is identified as the simplified version page.
6. according to the method described in claim 2, it is characterized in that, judging that the step of whether page is the simplified version page is also wrapped It includes: judging whether the page is not belonging to picture and text webpage and/or HTML5 webpage;When the page be not belonging to picture and text webpage and/or When 5 webpage of HTML, the page is identified as the simplified version page.
7. according to the method described in claim 2, it is characterized in that, judging that the step of whether page is the simplified version page is also wrapped It includes: judging whether the type for the font size that the page includes is less than preset upper limit threshold;When the font size that the page includes When type is less than the preset upper limit threshold, the page is identified as the simplified version page.
8. a kind of device for adjusting page font, which is characterized in that described device includes obtaining module, computing module and adjustment Module;
The main body font size for obtaining module and being used to obtain the page, wherein main body font size is the word that number of words is most in the page Number;
The computing module is used to calculate scaling according to the main body font size and default font size;
The adjustment module is for being adjusted the font in the page by the scaling.
9. device according to claim 8, which is characterized in that the acquisition module includes judging unit and obtains single Member;
The judging unit is for judging whether the page is the simplified version page;
The acquiring unit is used to obtain the main body font size of the page when the page is the simplified version page.
10. device according to claim 9, which is characterized in that the judging unit is specifically used for meeting when the page In preset condition when one or more combinations, the page is identified as the simplified version page, wherein the preset condition includes: The number of words of the text of the page is greater than the first preset value, and the number of words of the text of the page is greater than the second preset value and the page The text in face only has a kind of font size, and the page is not belonging to 5 webpage of picture and text webpage and/or HTML, the font size that the page includes Type be less than preset upper limit threshold.
CN201410823277.4A 2014-12-24 2014-12-24 A kind of method and device adjusting page font Active CN105791524B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410823277.4A CN105791524B (en) 2014-12-24 2014-12-24 A kind of method and device adjusting page font

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410823277.4A CN105791524B (en) 2014-12-24 2014-12-24 A kind of method and device adjusting page font

Publications (2)

Publication Number Publication Date
CN105791524A CN105791524A (en) 2016-07-20
CN105791524B true CN105791524B (en) 2019-03-29

Family

ID=56389230

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410823277.4A Active CN105791524B (en) 2014-12-24 2014-12-24 A kind of method and device adjusting page font

Country Status (1)

Country Link
CN (1) CN105791524B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106385626A (en) * 2016-10-26 2017-02-08 广东小天才科技有限公司 video playing processing method and device
CN109165065B (en) * 2018-07-26 2021-10-12 创新先进技术有限公司 Method, device and equipment for processing word list
CN109376806A (en) * 2018-10-26 2019-02-22 深圳点猫科技有限公司 A kind of method and electronic equipment based on Web page intelligent detection webpage text
CN112732378B (en) * 2020-12-29 2024-02-02 江苏徐工工程机械研究院有限公司 Man-machine interface design method of engineering machinery product display device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102646263A (en) * 2012-03-06 2012-08-22 优视科技有限公司 Scaling regulating method and device
CN102662616A (en) * 2012-03-28 2012-09-12 北京邮电大学 Screen graphics self-adaption method and system used for mobile terminal
CN103593196A (en) * 2013-11-25 2014-02-19 深信服网络科技(深圳)有限公司 Page layout self-adaptation method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140365881A1 (en) * 2013-06-07 2014-12-11 Apple Inc. Dynamically Adjusting Font Metrics

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102646263A (en) * 2012-03-06 2012-08-22 优视科技有限公司 Scaling regulating method and device
CN102662616A (en) * 2012-03-28 2012-09-12 北京邮电大学 Screen graphics self-adaption method and system used for mobile terminal
CN103593196A (en) * 2013-11-25 2014-02-19 深信服网络科技(深圳)有限公司 Page layout self-adaptation method and device

Also Published As

Publication number Publication date
CN105791524A (en) 2016-07-20

Similar Documents

Publication Publication Date Title
CN102314502B (en) A kind of method and apparatus for showing webpage body content on mobile terminals
US8731283B2 (en) Information processing apparatus, information processing method and information processing program
CN105791524B (en) A kind of method and device adjusting page font
CN102968474B (en) Webpage display process browsed by mobile communication equipment
KR20140012664A (en) Method for rearranging web page
CN102364460B (en) Automatic page amplification method and system based on mobile terminal
CN106708496B (en) Processing method and device for label page in graphical interface
US9477762B2 (en) Search controls using sliders and lightboxes
CN103678622A (en) Method and device for dynamic rendering of waterfall-type picture
US11151212B2 (en) Information analysis method, electronic device, and storage medium
Bryant et al. Responsive web design
WO2014206072A1 (en) Web page previewing method and system
CN102279708A (en) Method and device for processing data input
CN101719125A (en) Hand-held communication terminal and webpage browsing method thereof
CN101526953A (en) WWW transformation technology
CN103677720A (en) Picture display method and device based on website
EP2874054A1 (en) Application text adjusting method, device, and terminal
CN107256259A (en) Page display method, device, electronic equipment and storage medium
CN102436484A (en) Processing method and processing system for webpage picture amplification
CN101807192A (en) Webpage optical character recognition processing method used for mobile communication equipment terminal
CN112685671A (en) Page display method, device, equipment and storage medium
CN105808307B (en) Page display method and device
CN102222095B (en) Equipment for converting webpage to be displayed and method thereof
US20150169509A1 (en) Web page rendering on wireless devices
CN103092989A (en) Image display method and device adaptable to terminal screen

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20200529

Address after: 310052 room 508, floor 5, building 4, No. 699, Wangshang Road, Changhe street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: Alibaba (China) Co.,Ltd.

Address before: 510627 Guangdong city of Guangzhou province Whampoa Tianhe District Road No. 163 Xiping Yun Lu Yun Ping B radio 14 floor tower square

Patentee before: GUANGZHOU UCWEB COMPUTER TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right