CN102436452A - Webpage providing system and method for dynamically adjusting sizes of fonts - Google Patents
Webpage providing system and method for dynamically adjusting sizes of fonts Download PDFInfo
- Publication number
- CN102436452A CN102436452A CN2010105004706A CN201010500470A CN102436452A CN 102436452 A CN102436452 A CN 102436452A CN 2010105004706 A CN2010105004706 A CN 2010105004706A CN 201010500470 A CN201010500470 A CN 201010500470A CN 102436452 A CN102436452 A CN 102436452A
- Authority
- CN
- China
- Prior art keywords
- font size
- screen
- webpage
- client
- resolution
- 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.)
- Pending
Links
Images
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a webpage providing system and method for dynamically adjusting the sizes of fonts. The method comprises the following technical means of: establishing a mapping table of screen resolution and screen width in a network server in advance; when a webpage browse request of a client is received, reading the screen resolution of the client; querying the mapping table according to the screen resolution to obtain the ratio of the lateral resolution to the screen width; converting a font size physical value in the webpage to be browsed into a font size browse value; and finally, analyzing the webpage by a browser of the client and displaying the browsed webpage. Therefore, technical effects of optimally displaying the physical sizes of the fonts in the webpages on different display screens are achieved.
Description
Technical field
The present invention relates to a kind of webpage system and method thereof are provided, mean that especially a kind of webpage of the font of same physical size that can on different display screens, show provides system and method thereof.
Background technology
The modern lived in the epoch of information blast, and was accompanied by the fast development of network technology and the popularization of application, had become indispensable some in modern's life through the browser browsing page to obtain needed various information.
Webpage browsed in the past; Be that web page server by each information supplier provides webpage; When the browser input network address or choose of client through local side link produced browse request after; Web page server will send webpage to client, and the browser of client will analyzing web page and in the display of local side, shown.Yet; Because font size is fixed often in the webpage that is provided in the general web page server, therefore same webpage but possibly produce the font of different physics sizes for the client of display that uses different screen resolution, different screen width and different browsers.For instance, the suitable webpage of font size in certain display after having changed a display, possibly will produce the too big or too little problem of font of font.
Though present many browsers provide can convergent-divergent webpage font size function; The user also can adjust display effect through the adjustment resolution of screen, but just must readjust setting owing to open different webpage users each time, has caused the repetitive operation in user's use; And how not know the user of convergent-divergent webpage font for many; Cause sizable inconvenience especially, therefore be necessary to propose improved technological means, solved this problem.
Summary of the invention
Because the font physics problem not of uniform size that appears during the different display terminal display web page that prior art exists, the webpage that the present invention discloses a kind of dynamic adjustment font size then provides system and method thereof, wherein:
The webpage of the dynamically adjustment font size that the present invention is disclosed provides system, and be applicable to that in the web page server, it comprises: the Webpage material storehouse stores at least one webpage that comprises at least one font size physical values in advance; Receiver module is in order to receive browse request from client; Acquisition module in order to capture the webpage of corresponding browse request, reaches in order to read the employed resolution of screen of client from client; Modular converter; Establish correspondence table in advance; Comprise at least one resolution of screen and the screen width corresponding in the correspondence table with each resolution of screen; Modular converter is in order to each font size physical values of the webpage that reads acquisition; And according to the resolution of screen of client inquiry correspondence table to obtain the screen width corresponding with the resolution of screen of client, multiply by each font size physical values according to the horizontal resolution of the resolution of screen of client with the ratio of corresponding screen width again, to obtain each font size value of browsing and to produce more new web page; And delivery module, new web page shows after sending client and the browser resolves by client in order to incite somebody to action more.
The webpage providing method of the disclosed dynamic adjustment font size of the present invention; Be applicable in the web page server; It comprises the following step: set up correspondence table in the webserver in advance, comprise at least one resolution of screen and the screen width corresponding with each resolution of screen in the correspondence table; Store at least one webpage in web page server in advance, wherein each webpage comprises at least one font size physical values; Web page server receives browse request from client; Web page server captures the webpage of corresponding browse request; Web page server reads the employed resolution of screen of client from client; Web page server reads each font size physical values of the webpage of acquisition, and inquires about correspondence table to obtain the screen width corresponding with the resolution of screen of client according to the resolution of screen of client; Web page server multiply by each font size physical values according to the horizontal resolution of the resolution of screen of client with the ratio of corresponding screen width, to obtain each font size value of browsing and to produce more new web page; And web page server is incited somebody to action more, and new web page shows after sending client and the browser resolves by client to.
The disclosed System and method for of the present invention as above; And the difference between the prior art is that the present invention has the correspondence table of setting up resolution of screen and screen width in advance in the webserver; And when receiving the client terminal web page browse request, read the resolution of screen of client; Convert the font size value of browsing according to resolution of screen inquiry correspondence table into the font size physical values of obtaining horizontal resolution and screen width ratio and will desiring again in the browsing page again, at last by carrying out the technique for displaying means behind the browser resolves webpage of client again.
Through above-mentioned technological means, the present invention can be achieved in and carry out webpage font size physical values optimization technique for displaying effect on the different display screens.
Description of drawings
The 1st figure is the calcspar that webpage that the present invention dynamically adjusts font size provides system.
The 2nd figure is the process flow diagram that the present invention dynamically adjusts the webpage providing method of font size.
The 3rd figure is the correspondence table synoptic diagram of the embodiment of the invention.
[main element symbol description]
101 Webpage material storehouses, 102 receiver modules
103 acquisition modules, 104 modular converters
105 delivery modules, 301 correspondence table
Embodiment
Below will cooperate graphic and embodiment specifies embodiment of the present invention, whereby to the present invention how the application technology means implementation procedure that solves technical matters and reach technological effect can make much of and implement according to this.
At first, please refer to Fig. 1, the webpage of dynamically adjusting font size for the present invention provides the calcspar of system, the function that will be responsible in order to each module of explanation the present invention.The webpage of dynamic adjustment font size of the present invention provides systems to be applicable in the web page server, and it comprises Webpage material storehouse 101, receiver module 102, acquisition module 103, modular converter 104 and delivery module 105.
After acquisition module 103 captures the webpage of corresponding browse request and reads out the employed resolution of screen of client; Modular converter 104 will read each font size physical values in the webpage that is captured; According to the resolution of screen corresponding screen width of resolution of screen inquiry correspondence table to obtain client of client, then the font size physical values is converted into corresponding font size value of browsing and produces a more new web page then.For instance; The corresponding screen width of resolution of screen of supposing 1024x768 is 304.8mm; Because laterally resolution is 1024, need use 3.36px (pixel, in the webpage property value with " px " expression) when then desire shows the width of 1mm; Therefore if when desiring display font size physical values and being the square literal of 4.32mm, can converse font size value of browsing of needs use 14.5px according to the ratio of 1024px and 304.8mm.What need to specify is, the actual size of font size physical values system during for the display web page literal, the font size value of browsing then be according to the font size physical values convert later the actual font size value that can parsing and displaying of the browser that draws.In addition, it should be noted that since px value that even number is counted as: 14,16, display effect is preferable under the situation of 18..., so can only gets even number and count the px value as the font size value of browsing.What need to specify is, the font size value of browsing be except being pixel (px) value, also can be that to preset the font size percentage with modulation font size (em) or browser be unit.For instance, the preset font size of browser, assumed is 16px, then 1em=100%=16px, 0.75em=75%=12px at this moment.When the preset font size of browser is 12px, 1em=100%=12px then, this moment 2em=200%=24px.
When directly producing more new web page with pixel (px) value; In the process of client browser analyzing web page and demonstration; The font of webpage will directly show with the form of px; And when producing more new web page with the preset font size percentage (%) of modulation font size (em) or browser; Browser resolves webpage and demonstration back client still can be carried out the secondary convergent-divergent to the webpage literal through the preset font size of change browser again, also make the webpage font show that size more meets the demand of browsing of client whereby.
Whereby; When different display terminals is browsed same webpage; Even if use the display and the different browsers of different screen resolution, different screen width, the font physics size when its webpage literal shows can roughly be consistent, and promotes the display effect of webpage literal whereby.
Next, please refer to Fig. 2, for the present invention dynamically adjusts the process flow diagram of the webpage providing method of font size, will be in order to implementing procedure of the present invention to be described.The web page provision genealogy of law of dynamic adjustment font size of the present invention is applicable in the webserver that foundation comprises the correspondence table (step 201) that at least one resolution of screen reaches the screen width corresponding with each resolution of screen at first in advance in the webserver.The producing method of correspondence table can obtain the resolution of screen and main flow screen size and the ratio corresponding with the main flow resolution of screen of main flow in advance through statistical method, calculate screen width after the mean values then.For instance; Suppose to have the resolution of screen of a 1024x 768; The screen size that obtains use 1024x 768 resolution of screen through statistical method falls between 8~12 cun, the main flow screen size of 10 cun corresponding 1024x 768 resolution of screen of conduct of then can averaging this moment.After obtaining the main flow screen size, then again through statistical method obtain the different screen ratio as: 4: 3,16: 9,16: the screen width of 10... etc., obtain the screen width of corresponding 1024x 768 resolution of screen at last through mean values.Because the mode of statistical method is numerous, then do not limit at this, but the mode of corresponding relation all can be in order to produce correspondence table of the present invention between any setting screen resolution and the screen width to the acquisition mode of correspondence table.
Except setting up correspondence table, this method also stores at least one webpage (step 202) in web page server in advance, also comprises at least one font size physical values in each webpage.What need special instruction is; The font size physical values is equivalent in the webpage the corresponding font size that each display text is actual when showing; For each webpage, in order to build different display effects, different display texts just can corresponding different font size physical values.For instance, suppose that a html web page title needs bigger font to show that then the font size physical values can be set at 12mm, the font of literary composition only needs the font of general size to show that then its font size physical values can be set at 3mm in the webpage.
Then; Web page server receives browse request (step 203) from client; When client needs browsing page, can produce the browse request of browsing certain particular webpage through the browser of local side, after web page server receives browse request; Then will capture the webpage (step 204) of corresponding browse request, and read the employed resolution of screen of client (step 205) from client.What need to specify is, capture the webpage of corresponding browse request when web page server after, the JavaScript that will be comprised acquisition client screen resolution by a section in the webpage that captures describes the resolution of screen that reads client.
Obtain the resolution of screen of client when web page server after; Web page server will then read each font size physical values of the webpage of acquisition; And according to the resolution of screen of client inquiry correspondence table to obtain the screen width (step 206) corresponding with the resolution of screen of client; Web page server multiply by each font size physical values according to the horizontal resolution of the resolution of screen of client with the ratio of corresponding screen width more then, to obtain each font size value of browsing and to produce more new web page (step 207).For instance; The corresponding screen width of resolution of screen of supposing 1024x 768 is 304.8mm; Because laterally resolution is 1024; 3.36px need be used when then desire shows the width of 1mm,, font size value of browsing of needs use 14.5px can be conversed according to the ratio of 1024px and 304.8mm therefore if when desiring display font size physical values and being the square literal of 4.32mm.What need to specify is, the actual size of font size physical values system during for the display web page literal, and the font size value of browsing also can be to preset font size percentage (%) with modulation font size (em) or browser except being pixel (px) value.It should be noted that since even pixel (px) as: 14,16, display effect is preferable under the situation of 18..., therefore when the font size value of browsing is pixel (px), can only get the even number point value as the font size value of browsing.
Web page server can directly produce more new web page after converting the font size physical values into the font size value of browsing.When directly producing more new web page with pixel (px) value; In the process of client browser analyzing web page and demonstration; The font size of webpage will directly show with the form of px; And in the time will producing more new web page with the preset font size percentage (%) of modulation font size (em) or browser, the browser resolves webpage also shows that the back client still can carry out the secondary convergent-divergent to the webpage literal through the setting of browser again, also makes the webpage font show that size more meets the demand of browsing of client whereby.
At last, web page server will be more new web page show (step 207) after sending client and browser resolves to by client.
Next, will be with an embodiment graphic detailed embodiment of the present invention of explaining of the present invention of arranging in pairs or groups.
Suppose to have an application that web page server of the present invention is arranged; It establishes in advance and comprises the correspondence table that at least one resolution of screen reaches the screen width corresponding with each resolution of screen; Shown in the correspondence table 301 of Fig. 3; Different resolution of screen be to should there being different screen widths, and can obtain a ratio by different horizontal resolutions and screen width.Except establishing correspondence table, also store at least one webpage in the middle of the web page server, comprise the display properties of at least one font size physical values in each webpage.For instance, suppose that the webpage that stores in the web page server is a html web page, and the actual font size that hypothesis has one first its web page title of webpage to show is 3mm, then its font size physical values can be set at 3mm.
Suppose that existing its employed resolution of one first client is 1024x 768; When the browser of first client through local side produces browse request and is sent to web page server; Web page server will capture corresponding webpage according to browse request, and obtains the resolution of screen of first client through one section JavaScript description of webpage.Suppose that the user desires to browse first webpage; After then web page server has captured first webpage; At first will read the display properties of the font size physical values in first webpage, then the resolution of screen inquiry correspondence table according to 1024x 768 obtains screen width 304.8mm.After obtaining screen width, convert the font size physical values into the font size value of browsing according to the horizontal resolution of the first client screen resolution and the ratio of screen width.The display properties of takeing font size physical values in aforementioned its web page title of first webpage is the example of 3mm; Because the actual size that desire shows is 3mm, can obtains the font size value of browsing according to the ratio of the horizontal resolution of the first client screen resolution and screen width and should take 10.07px.Because the font size that the px value of in general browser resolves process, counting with even number is demonstrated has preferable display effect; Therefore when getting the font size value of browsing, also can only get the original font size physical values of px value replacement that even number counts and produce more new web page.
What need special instruction is; Web page server produces more the new web page as the font size value of browsing except direct pixel (px) value, also can use the preset font size percentage (%) of modulation font size (em) or browser to produce more new web page as the font size value of browsing.When directly producing more new web page with pixel (px) value; In the process of client browser analyzing web page and demonstration; The font size of webpage will directly show with the form of px; And when producing more new web page with the preset font size percentage (%) of modulation font size (em) or browser, the browser resolves webpage also shows that the back client still can carry out the secondary convergent-divergent to the webpage literal through the setting of browser again, also makes the webpage font show that size more meets the demand of browsing of client whereby.
At last, web page server is sent to first client with webpage, after the browser resolves through first client, can demonstrate the webpage that the title font size is 3mm.That suppose existing one second client use is the resolution of screen 1280x 1024 different with first client; Then when second client is desired to browse first webpage equally; Web page server can be inquired about the screen width of corresponding 1280x 1024 resolution of screen equally earlier; Convert the font size physical values into the font size value of browsing according to the ratio of the horizontal resolution of resolution of screen and screen width again and produce more new web page again; And be sent to second client, show after the browser resolves by second client.Whereby; Though first client and second client are used different screen resolution browsing page; But for first client and second client; The title font size of first webpage all can be 3mm, makes on different display terminals, still to show consistent webpage font size, has promoted the display effect of webpage font.
Though the disclosed embodiment of the present invention as above, only described content is not in order to direct qualification scope of patent protection of the present invention.Those of ordinary skill in the technical field under any the present invention under the prerequisite that does not break away from disclosed spirit of the present invention and scope, can be done a little change what implement in form and on the details.Scope of patent protection of the present invention, still must with appending claims the person of being defined be as the criterion.
Claims (6)
1. a webpage of dynamically adjusting font size provides system, is applicable in the web page server, it is characterized in that, comprises:
One Webpage material storehouse stores at least one webpage that comprises at least one font size physical values in advance;
One receiver module is in order to receive a browse request from a client;
One acquisition module to this webpage that should browse request, and reads the employed resolution of screen of this client in order to this client certainly in order to acquisition;
One modular converter; Establish a correspondence table in advance; This correspondence table comprises at least one this resolution of screen and a screen width corresponding with this resolution of screen; This modular converter is in order to respectively this font size physical values of this webpage of reading acquisition; And according to this correspondence table of this resolution of screen inquiry of this client to obtain this screen width corresponding with this resolution of screen of this client, multiply by respectively this font size physical values according to the horizontal resolution of this resolution of screen of this client with the ratio of corresponding this screen width again, to obtain each font size value of browsing and to produce a new web page more; And
One delivery module, in order to this more new web page show after sending this client and browser resolves to by this client.
2. the webpage of dynamic adjustment font size as claimed in claim 1 provides system, it is characterized in that, respectively this font size value of browsing system is the preset font size percentage of pixel, modulation font size or browser.
3. the webpage of dynamic adjustment font size as claimed in claim 2 provides system, it is characterized in that, when this font size value of browsing is pixel, only takes the even number point value.
4. a webpage providing method of dynamically adjusting font size is applicable in the web page server, it is characterized in that, comprises the following step:
Set up a correspondence table in this webserver in advance, this correspondence table comprise at least one resolution of screen and with the corresponding screen width of this resolution of screen respectively;
Store at least one webpage in this web page server in advance, wherein respectively this webpage comprises at least one font size physical values;
This web page server receives a browse request from a client;
The acquisition of this web page server is to this webpage that should browse request;
This web page server reads employed this resolution of screen of this client from this client;
This web page server reads respectively this font size physical values of this webpage of acquisition, and inquires about this correspondence table to obtain this screen width corresponding with this resolution of screen of this client according to this resolution of screen of this client;
This web page server multiply by respectively this font size physical values according to the horizontal resolution of this resolution of screen of this client with the ratio of corresponding this screen width, to obtain each font size value of browsing and to produce a new web page more; And
This web page server with this more new web page show after sending this client and browser resolves to by this client.
5. the webpage providing method of dynamic adjustment font size as claimed in claim 4 is characterized in that, respectively this font size value of browsing system is the preset font size percentage of pixel, modulation font size or browser.
6. the webpage providing method of dynamic adjustment font size as claimed in claim 5 is characterized in that, when this font size value of browsing system is pixel, only takes the even number point value.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2010105004706A CN102436452A (en) | 2010-09-29 | 2010-09-29 | Webpage providing system and method for dynamically adjusting sizes of fonts |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2010105004706A CN102436452A (en) | 2010-09-29 | 2010-09-29 | Webpage providing system and method for dynamically adjusting sizes of fonts |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102436452A true CN102436452A (en) | 2012-05-02 |
Family
ID=45984518
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2010105004706A Pending CN102436452A (en) | 2010-09-29 | 2010-09-29 | Webpage providing system and method for dynamically adjusting sizes of fonts |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102436452A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103488777A (en) * | 2013-09-30 | 2014-01-01 | 乐视网信息技术(北京)股份有限公司 | Method and system for adjusting webpage display effect |
WO2014000346A1 (en) * | 2012-06-29 | 2014-01-03 | 百度在线网络技术(北京)有限公司 | Self-adaptive layout method and device for web page |
WO2015051505A1 (en) * | 2013-10-09 | 2015-04-16 | Tsai Yi Chung | Method and system for displaying web page on device by automatically adapting the web page to the size of browser of the device |
CN104537004A (en) * | 2014-12-15 | 2015-04-22 | 小米科技有限责任公司 | Webpage character displaying method and device |
CN106776738A (en) * | 2016-11-18 | 2017-05-31 | 北京奇虎科技有限公司 | A kind of auto-building html files, display methods and device |
CN107590240A (en) * | 2017-09-13 | 2018-01-16 | 武汉斗鱼网络科技有限公司 | A kind of method and device of adjustment word size for page rendering |
-
2010
- 2010-09-29 CN CN2010105004706A patent/CN102436452A/en active Pending
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2014000346A1 (en) * | 2012-06-29 | 2014-01-03 | 百度在线网络技术(北京)有限公司 | Self-adaptive layout method and device for web page |
CN103488777A (en) * | 2013-09-30 | 2014-01-01 | 乐视网信息技术(北京)股份有限公司 | Method and system for adjusting webpage display effect |
WO2015051505A1 (en) * | 2013-10-09 | 2015-04-16 | Tsai Yi Chung | Method and system for displaying web page on device by automatically adapting the web page to the size of browser of the device |
CN104537004A (en) * | 2014-12-15 | 2015-04-22 | 小米科技有限责任公司 | Webpage character displaying method and device |
CN106776738A (en) * | 2016-11-18 | 2017-05-31 | 北京奇虎科技有限公司 | A kind of auto-building html files, display methods and device |
CN107590240A (en) * | 2017-09-13 | 2018-01-16 | 武汉斗鱼网络科技有限公司 | A kind of method and device of adjustment word size for page rendering |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102436452A (en) | Webpage providing system and method for dynamically adjusting sizes of fonts | |
CN101908076B (en) | Page layout self-adaptive method and device | |
CN100383783C (en) | Presenting html content on a small screen terminal display | |
CN101789961B (en) | Picture scaling system used for terminal of mobile communication equipment and application method thereof | |
CN101996206B (en) | Method, device and system for displaying web page | |
CN101449270B (en) | Automatic display of resized images | |
FI117656B (en) | Content optimization for receiving terminals | |
CN101401091A (en) | Apparatus and method for changing web design | |
CN105528408A (en) | Page display method and apparatus | |
CN101536075A (en) | Generating image-based reflowable files for rendering on various sized displays | |
US9171235B2 (en) | Image forming apparatus, host apparatus, and method for printing out web page therewith | |
CN105094563A (en) | Image clipping method and system | |
CN102262627A (en) | Webpage segmentation method and webpage segmentation system | |
CN103605783A (en) | Webpage display method and device | |
CN103186505B (en) | A kind of method and apparatus determining display mode of electronic document | |
CN102053787A (en) | Information processing apparatus, image enlargement processing method, and program | |
CN103870444A (en) | Image cutting method and system for image type texts | |
CN101902500A (en) | WEB service system based on SVG technique and method thereof | |
CN101620621A (en) | Method and system for segmenting web page | |
CN102915251A (en) | Method and device for processing message by multi-page browser | |
CN105791524A (en) | Method and device for adjusting page font | |
CN102272696B (en) | Method and system for touch screen text entry | |
CN100521786C (en) | Graphics file transferring method and system | |
CN102841890B (en) | A kind of data processing method for document structure and device | |
CN102096715A (en) | Method and system for acquiring webpage template, and method and system for generating single website |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20120502 |