CN102436452A - Webpage providing system and method for dynamically adjusting font size - Google Patents

Webpage providing system and method for dynamically adjusting font size Download PDF

Info

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
client
webpage
screen
value
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
Application number
CN2010105004706A
Other languages
Chinese (zh)
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.)
Inventec Corp
Original Assignee
Inventec Corp
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 Inventec Corp filed Critical Inventec Corp
Priority to CN2010105004706A priority Critical patent/CN102436452A/en
Publication of CN102436452A publication Critical patent/CN102436452A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

本发明公开了一种动态调整字体大小的网页提供系统及其方法,其通过预先于网络服务器建立屏幕解析度及屏幕宽度的对应表,并于接收到客户端网页浏览请求时读取客户端的屏幕解析度,再根据屏幕解析度查询对应表以取得横向解析度与屏幕宽度比例再将欲浏览网页中的字体大小物理值转换为字体大小浏览值,最后由客户端的浏览器解析网页后再进行显示的技术手段,借此达成于不同显示屏幕上进行网页字体物理大小的最佳化显示的技术功效。

The present invention discloses a web page providing system and method for dynamically adjusting font size. The system establishes a corresponding table of screen resolution and screen width in advance on a network server, reads the screen resolution of the client when receiving a web page browsing request from the client, and then searches the corresponding table according to the screen resolution to obtain the ratio of the horizontal resolution and the screen width, and then converts the physical value of the font size in the web page to be browsed into the font size browsing value. Finally, the web page is parsed by the browser of the client and then displayed. The technical effect of optimizing the physical size of the web page font on different display screens is achieved.

Description

动态调整字体大小的网页提供系统及其方法Web page providing system and method for dynamically adjusting font size

技术领域 technical field

本发明涉及一种网页提供系统及其方法,特别系指一种可以于不同显示屏幕上显示相同物理大小的字体的网页提供系统及其方法。The present invention relates to a system and method for providing a web page, in particular to a system and method for providing a web page that can display fonts of the same physical size on different display screens.

背景技术 Background technique

现代人生活在资讯爆炸的时代,而伴随着网络技术的快速发展和应用层面的推广,通过浏览器浏览网页以取得所需要的各种资讯已经成了现代人生活中不可或缺的一部份。Modern people live in the era of information explosion, and with the rapid development of network technology and the promotion of application level, it has become an indispensable part of modern people's life to browse the web through a browser to obtain all kinds of information they need .

以往网页的浏览,是由各个资讯供应者的网页服务器提供网页,当客户端通过本地端的浏览器输入网址或是选取连结产生了浏览请求后,网页服务器将会把网页传送给客户端,而客户端的浏览器将会解析网页并且在本地端的显示器中显示出来。然而,由于一般网页服务器中所提供的网页中字体大小往往是固定的,因此同一个网页对于使用不同屏幕解析度、不同屏幕宽度的显示器及不同浏览器的客户端来说却可能产生不同物理大小的字体。举例来说,在某个显示器中字体大小合适的网页,当换了一个显示器后,可能就会产生字体太大或是字体太小的问题。In the past, the browsing of web pages was provided by the web servers of various information providers. When the client enters the URL or selects a link through the local browser to generate a browsing request, the web server will send the web page to the client, and the client The browser at the end will parse the webpage and display it on the monitor at the local end. However, since the font size in web pages provided by general web servers is often fixed, the same web page may have different physical sizes for clients using displays with different screen resolutions, different screen widths, and different browsers. font. For example, a web page with a proper font size on a certain display may have problems with too large fonts or too small fonts when the display is changed.

虽然目前许多浏览器已提供可以缩放网页字体大小的功能,使用者也可以通过调整屏幕解析度来调整显示效果,但由于每一次开启不同的网页使用者便必须重新调整设定,造成了使用者使用上的重复操作,而对于许多不知如何缩放网页字体的使用者来说,更是造成了相当大的不便,因此有必要提出改进的技术手段,来解决此一问题。Although many browsers currently provide the function of zooming the font size of web pages, users can also adjust the display effect by adjusting the screen resolution, but users have to re-adjust the settings every time they open a different web page, causing users Repeated operations in use have caused considerable inconvenience to many users who do not know how to scale web fonts. Therefore, it is necessary to propose improved technical means to solve this problem.

发明内容 Contents of the invention

有鉴于现有技术存在的不同显示终端显示网页时呈现的字体物理大小不一的问题,本发明遂公开一种动态调整字体大小的网页提供系统及其方法,其中:In view of the problem in the prior art that different display terminals display fonts with different physical sizes when displaying webpages, the present invention discloses a system and method for dynamically adjusting font sizes for providing webpages, wherein:

本发明所公开之动态调整字体大小的网页提供系统,适用于网页服务器中,其包含:网页资料库,预先储存有包含至少一字体大小物理值的至少一网页;接收模块,用以自客户端接收浏览请求;撷取模块,用以撷取对应浏览请求的网页,及用以自客户端读取客户端所使用的屏幕解析度;转换模块,预先建立有对应表,对应表中包含至少一屏幕解析度及与各屏幕解析度对应的屏幕宽度,转换模块用以读取撷取之网页的各字体大小物理值,并根据客户端的屏幕解析度查询对应表以取得与客户端的屏幕解析度对应的屏幕宽度,再根据客户端的屏幕解析度的横向解析度与对应的屏幕宽度的比值乘以各字体大小物理值,以取得各字体大小浏览值并产生更新网页;及传送模块,用以将更新网页传送给客户端并由客户端的浏览器解析后进行显示。The webpage providing system for dynamically adjusting the font size disclosed by the present invention is applicable to a webpage server, which includes: a webpage database, which pre-stores at least one webpage containing at least one physical value of font size; a receiving module, used for receiving from the client receiving a browsing request; the retrieval module is used to retrieve the web page corresponding to the browsing request, and is used to read the screen resolution used by the client from the client; the conversion module has a corresponding table established in advance, and the corresponding table contains at least one The screen resolution and the screen width corresponding to each screen resolution, the conversion module is used to read the physical value of each font size of the captured web page, and query the corresponding table according to the client's screen resolution to obtain the corresponding to the client's screen resolution According to the ratio of the horizontal resolution of the client's screen resolution and the corresponding screen width, the physical value of each font size is multiplied by the physical value of each font size to obtain the browsing value of each font size and generate an updated web page; and the transmission module is used to update The webpage is transmitted to the client and displayed after being parsed by the client's browser.

本发明所公开的动态调整字体大小的网页提供方法,适用于网页服务器中,其包含下列步骤:预先于网络服务器建立对应表,对应表中包含至少一屏幕解析度及与各屏幕解析度对应的屏幕宽度;预先于网页服务器储存至少一网页,其中各网页包含至少一字体大小物理值;网页服务器自客户端接收浏览请求;网页服务器撷取对应浏览请求的网页;网页服务器自客户端读取客户端所使用的屏幕解析度;网页服务器读取撷取的网页的各字体大小物理值,并根据客户端的屏幕解析度查询对应表以取得与客户端的屏幕解析度对应的屏幕宽度;网页服务器根据客户端的屏幕解析度的横向解析度与对应的屏幕宽度的比值乘以各字体大小物理值,以取得各字体大小浏览值并产生更新网页;及网页服务器将更新网页传送给客户端并由客户端的浏览器解析后进行显示。The method for providing a webpage with dynamically adjusted font size disclosed by the present invention is suitable for a webpage server, and includes the following steps: establishing a corresponding table on the network server in advance, and the corresponding table includes at least one screen resolution and the information corresponding to each screen resolution Screen width; pre-store at least one webpage in the web server, wherein each web page includes at least one font size physical value; the web server receives the browsing request from the client; the web server retrieves the web page corresponding to the browsing request; the web server reads the client from the client The screen resolution used by the client; the web server reads the physical value of each font size of the captured web page, and queries the corresponding table according to the screen resolution of the client to obtain the screen width corresponding to the screen resolution of the client; The ratio of the horizontal resolution of the screen resolution of the terminal to the corresponding screen width is multiplied by the physical value of each font size to obtain the browsing value of each font size and generate an updated web page; and the web server transmits the updated web page to the client and browsed by the client displayed after parsing.

本发明所公开的系统与方法如上,与现有技术之间的差异在于本发明具有预先于网络服务器建立屏幕解析度及屏幕宽度的对应表,并于接收到客户端网页浏览请求的同时读取客户端的屏幕解析度,再根据屏幕解析度查询对应表以取得横向解析度与屏幕宽度比例再将欲浏览网页中的字体大小物理值转换为字体大小浏览值,最后由客户端的浏览器解析网页后再进行显示的技术手段。The system and method disclosed in the present invention are as above, and the difference between the present invention and the prior art is that the present invention has a corresponding table of screen resolution and screen width established in the network server in advance, and reads the corresponding table when receiving the web page browsing request from the client. The screen resolution of the client, and then query the corresponding table according to the screen resolution to obtain the ratio of the horizontal resolution to the screen width, and then convert the physical value of the font size in the web page to be browsed into the font size browsing value, and finally the browser of the client parses the web page Then display the technical means.

通过上述的技术手段,本发明可以达成于不同显示屏幕上进行网页字体大小物理值最佳化显示的技术功效。Through the above-mentioned technical means, the present invention can achieve the technical effect of optimizing the physical value of the font size of the web page on different display screens.

附图说明 Description of drawings

第1图为本发明动态调整字体大小的网页提供系统的方块图。FIG. 1 is a block diagram of a system for providing webpages with dynamically adjusted font sizes according to the present invention.

第2图为本发明动态调整字体大小的网页提供方法的流程图。Fig. 2 is a flow chart of the method for providing a web page with dynamically adjusted font size in the present invention.

第3图为本发明实施例的对应表示意图。Fig. 3 is a schematic diagram of the correspondence table of the embodiment of the present invention.

【主要元件符号说明】[Description of main component symbols]

101网页资料库      102接收模块101 webpage database 102 receiving module

103撷取模块        104转换模块103 Extraction module 104 Conversion module

105传送模块        301对应表105 transmission module 301 correspondence table

具体实施方式 Detailed ways

以下将配合图式及实施例来详细说明本发明的实施方式,借此对本发明如何应用技术手段来解决技术问题并达成技术功效的实现过程能充分理解并据以实施。The implementation of the present invention will be described in detail below in conjunction with the drawings and examples, so that the realization process of how to use technical means to solve technical problems and achieve technical effects in the present invention can be fully understood and implemented accordingly.

首先,请参考图1,为本发明动态调整字体大小的网页提供系统的方块图,将用以说明本发明各模块所负责的功能。本发明的动态调整字体大小的网页提供系统系适用于网页服务器中,其包含网页资料库101、接收模块102、撷取模块103、转换模块104及传送模块105。First, please refer to FIG. 1 , which is a block diagram of a system for dynamically adjusting font sizes of the present invention, which will be used to illustrate the functions of each module of the present invention. The system for providing webpages with dynamically adjusted font size of the present invention is applicable to a webpage server, which includes a webpage database 101 , a receiving module 102 , an extracting module 103 , a converting module 104 and a transmitting module 105 .

网页资料库101,预先建立有包含至少一字体大小物理值的至少一网页。字体大小物理值相当于网页中对应各个显示文字实际进行显示时的字体大小,对于每一个网页来说,为了营造不同的显示效果,不同的显示文字便会对应有不同的字体大小物理值。举例来说,假设一个HTML网页标题需要较大的字体显示,则字体大小物理值可以设定为12mm,网页内文的字体仅需要一般大小的字体显示,则其字体大小物理值可以设定为3mm。The web page database 101 is pre-established with at least one web page including at least one font size physical value. The physical value of the font size is equivalent to the actual font size of each displayed text on the webpage. For each webpage, in order to create different display effects, different displayed texts will have different physical font size values. For example, assuming that the title of an HTML webpage needs to be displayed in a larger font, the physical value of the font size can be set to 12mm, and the font of the content of the webpage only needs to be displayed in a font of a normal size, then the physical value of the font size can be set to 3mm.

接收模块102,负责自客户端接收浏览请求。当客户端需要浏览网页时,可以通过本地端的浏览器产生浏览某个特定网页的浏览请求,此时接收模块102将会负责接收客户端所传送的浏览请求。The receiving module 102 is responsible for receiving browsing requests from the client. When the client needs to browse the webpage, it can generate a browsing request to browse a specific webpage through the local browser, and the receiving module 102 will be responsible for receiving the browsing request sent by the client.

撷取模块103,负责撷取对应浏览请求的网页,同时也负责自客户端读取客户端所使用的屏幕解析度。需要特别说明的是,撷取模块103撷取出对应浏览请求的网页后将会由撷取的网页中的一段JavaScript描述读取客户端屏幕解析度。The capturing module 103 is responsible for capturing the webpage corresponding to the browsing request, and is also responsible for reading the screen resolution used by the client from the client. It should be noted that after the capture module 103 captures the web page corresponding to the browsing request, it will read the client screen resolution from a section of JavaScript description in the captured web page.

转换模块104,预先建立有一个包含至少一屏幕解析度及与各个屏幕解析度对应的屏幕宽度的对应表。对应表的产生方式可以预先通过统计方法取得主流的屏幕解析度及与主流屏幕解析度对应的主流屏幕尺寸及比例,然后平均数值后计算出屏幕宽度。举例来说,假设有一1024x768的屏幕解析度,通过统计方法取得使用1024x768屏幕解析度的屏幕尺寸落于8~12寸之间,则此时可以取平均值10寸作为对应1024x768屏幕解析度的主流屏幕尺寸。得到主流屏幕尺寸后,接着再通过统计方法取得不同屏幕比例如:4∶3、16∶9、16∶10...等的屏幕宽度,最后通过平均数值取得对应1024x 768屏幕解析度的屏幕宽度。由于统计方法的方式众多,在此则不针对对应表的取得方式加以限定,任何可设定屏幕解析度及屏幕宽度之间对应关系的方式均可用以产生本发明所述的对应表The conversion module 104 is pre-established a correspondence table including at least one screen resolution and a screen width corresponding to each screen resolution. The generation of the correspondence table can be obtained by statistical methods in advance of the mainstream screen resolution and the mainstream screen size and ratio corresponding to the mainstream screen resolution, and then average the values to calculate the screen width. For example, suppose there is a screen resolution of 1024x768, and the screen size using the 1024x768 screen resolution obtained through statistical methods falls between 8 and 12 inches, then the average value of 10 inches can be taken as the mainstream corresponding to the 1024x768 screen resolution. screen size. After obtaining the mainstream screen size, then use statistical methods to obtain the screen widths of different screen ratios such as: 4:3, 16:9, 16:10, etc., and finally obtain the screen width corresponding to the 1024x 768 screen resolution through the average value . Since there are many ways of statistical methods, the method of obtaining the corresponding table is not limited here. Any method that can set the corresponding relationship between the screen resolution and the screen width can be used to generate the corresponding table described in the present invention.

当撷取模块103撷取出对应浏览请求的网页并读取出客户端所使用的屏幕解析度后,转换模块104将会读取所撷取出的网页中的各个字体大小物理值,然后根据客户端的屏幕解析度查询对应表以取得客户端的屏幕解析度对应的屏幕宽度,接着将字体大小物理值转换为对应的字体大小浏览值并产生一个更新网页。举例来说,假设1024x768的屏幕解析度对应的屏幕宽度为304.8mm,由于横向解析度为1024,则欲显示1mm的宽度时需使用到3.36px(即像素,于网页属性值中以“px”表示),因此若欲显示字体大小物理值为4.32mm见方的文字时,根据1024px与304.8mm的比值可以换算出需要使用14.5px的字体大小浏览值。需要特别说明的是,字体大小物理值系为显示网页文字时的实际大小,而字体大小浏览值则是依据字体大小物理值换算过后所得出浏览器实际可以解析显示的字体大小值。此外,值得注意的是,由于在偶数点数的px值如:14、16、18...的情况下显示效果较佳,因此可以仅取偶数点数px值作为字体大小浏览值。需要特别说明的是,字体大小浏览值除了可以是像素(px)值,也可以是以调变字体大小(em)或浏览器预设字体大小百分比例为单位。举例来说,假设浏览器的预设字体大小为16px,则1em=100%=16px,此时0.75em=75%=12px。当浏览器的预设字体大小为12px时,则1em=100%=12px,此时2em=200%=24px。After the capture module 103 captures the webpage corresponding to the browsing request and reads the screen resolution used by the client, the conversion module 104 will read the physical values of each font size in the captured webpage, and then according to the client's The screen resolution queries the corresponding table to obtain the screen width corresponding to the screen resolution of the client, and then converts the font size physical value into a corresponding font size browsing value and generates an update webpage. For example, assuming that the screen resolution of 1024x768 corresponds to a screen width of 304.8mm, since the horizontal resolution is 1024, it needs to use 3.36px (that is, pixels, "px" in the web page attribute value) to display a width of 1mm Indicates), so if you want to display text with a font size whose physical value is 4.32mm square, according to the ratio of 1024px to 304.8mm, you can convert it to use a font size browsing value of 14.5px. It should be noted that the physical value of the font size is the actual size of the text displayed on the webpage, and the browsing value of the font size is the font size value that the browser can actually parse and display after conversion based on the physical value of the font size. In addition, it is worth noting that, since the display effect is better in the case of px values of even points such as: 14, 16, 18..., you can only take the px value of even points as the font size browsing value. It should be noted that the font size browsing value can not only be a pixel (px) value, but also can be a unit of an adjusted font size (em) or a browser default font size percentage. For example, assuming that the default font size of the browser is 16px, then 1em=100%=16px, at this time 0.75em=75%=12px. When the default font size of the browser is 12px, then 1em=100%=12px, at this time 2em=200%=24px.

当直接以像素(px)值产生更新网页时,客户端浏览器解析网页并显示的过程中,网页的字体将以px的形式直接显示,而当以调变字体大小(em)或浏览器预设字体大小百分比例(%)产生更新网页时,浏览器解析网页并显示后客户端仍然可以通过变更浏览器的预设字体大小再对网页文字进行二次缩放,借此也使网页字体显示大小更符合客户端的浏览需求。When the updated webpage is generated directly with the pixel (px) value, the font of the webpage will be displayed directly in the form of px during the process of parsing and displaying the webpage by the client browser. Set the font size percentage (%) to generate an updated webpage, after the browser parses and displays the webpage, the client can still re-scale the webpage text by changing the default font size of the browser, so as to make the webpage font display size It is more in line with the browsing needs of the client.

传送模块105,负责将转换模块104所产生的更新网页传送给客户端,并由客户端的浏览器解析完成后进行显示。The transmission module 105 is responsible for transmitting the updated webpage generated by the conversion module 104 to the client, and the browser of the client will display it after parsing.

借此,当不同的显示终端浏览同一网页时,即便是使用不同屏幕解析度、不同屏幕宽度的显示器及不同浏览器,其网页文字显示时的字体物理大小可以大致保持一致,借此提升网页文字的显示效果。In this way, when different display terminals browse the same webpage, even if monitors with different screen resolutions, different screen widths, and different browsers are used, the physical font size of the webpage text displayed can be roughly consistent, thereby improving webpage text. display effect.

接下来,请参考图2,为本发明动态调整字体大小的网页提供方法的流程图,将用以说明本发明的实施流程。本发明的动态调整字体大小的网页提供方法系适用于网络服务器中,于网络服务器中首先预先建立包含至少一屏幕解析度及与各屏幕解析度对应的屏幕宽度的对应表(步骤201)。对应表的产生方式可以预先通过统计方法取得主流的屏幕解析度及与主流屏幕解析度对应的主流屏幕尺寸及比例,然后平均数值后计算出屏幕宽度。举例来说,假设有一1024x 768的屏幕解析度,通过统计方法取得使用1024x 768屏幕解析度的屏幕尺寸落于8~12寸之间,则此时可以取平均值10寸作为对应1024x 768屏幕解析度的主流屏幕尺寸。得到主流屏幕尺寸后,接着再通过统计方法取得不同屏幕比例如:4∶3、16∶9、16∶10...等的屏幕宽度,最后通过平均数值取得对应1024x 768屏幕解析度的屏幕宽度。由于统计方法的方式众多,在此则不针对对应表的取得方式加以限定,任何可设定屏幕解析度及屏幕宽度之间对应关系的方式均可用以产生本发明所述的对应表。Next, please refer to FIG. 2 , which is a flow chart of the method for providing a web page with dynamically adjusted font size according to the present invention, which will be used to illustrate the implementation process of the present invention. The method for providing a web page with dynamically adjusted font size of the present invention is applicable to a web server. In the web server, a correspondence table including at least one screen resolution and a screen width corresponding to each screen resolution is first established in advance (step 201). The generation of the correspondence table can be obtained by statistical methods in advance of the mainstream screen resolution and the mainstream screen size and ratio corresponding to the mainstream screen resolution, and then average the values to calculate the screen width. For example, suppose there is a screen resolution of 1024x 768, and the screen size using the 1024x 768 screen resolution obtained through statistical methods falls between 8 and 12 inches, then the average value of 10 inches can be taken as the corresponding 1024x 768 screen resolution mainstream screen sizes. After obtaining the mainstream screen size, then use statistical methods to obtain the screen widths of different screen ratios such as: 4:3, 16:9, 16:10, etc., and finally obtain the screen width corresponding to the 1024x 768 screen resolution through the average value . Since there are many methods of statistical methods, the method of obtaining the corresponding table is not limited here, and any method that can set the corresponding relationship between the screen resolution and the screen width can be used to generate the corresponding table described in the present invention.

除了建立对应表外,本方法亦预先于网页服务器储存至少一网页(步骤202),各个网页中也包含至少一字体大小物理值。需要特别说明的是,字体大小物理值相当于网页中对应各个显示文字实际进行显示时的字体大小,对于每一个网页来说,为了营造不同的显示效果,不同的显示文字便会对应不同的字体大小物理值。举例来说,假设一个HTML网页标题需要较大的字体显示,则字体大小物理值可以设定为12mm,网页内文的字体仅需要一般大小的字体显示,则其字体大小物理值可以设定为3mm。In addition to establishing the correspondence table, the method also pre-stores at least one webpage on the webpage server (step 202), and each webpage also includes at least one physical font size value. It should be noted that the physical value of the font size is equivalent to the actual font size of each display text on the web page. For each web page, in order to create different display effects, different display text will correspond to different fonts. Size physical value. For example, assuming that the title of an HTML webpage needs to be displayed in a larger font, the physical value of the font size can be set to 12mm, and the font of the content of the webpage only needs to be displayed in a font of a normal size, then the physical value of the font size can be set to 3mm.

接着,网页服务器自客户端接收浏览请求(步骤203),当客户端需要浏览网页时,可以通过本地端的浏览器产生浏览某个特定网页的浏览请求,当网页服务器接收到浏览请求后,接着将撷取对应浏览请求的网页(步骤204),并自客户端读取客户端所使用的屏幕解析度(步骤205)。需要特别说明的是,当网页服务器撷取出对应浏览请求的网页后,将会由撷取出的网页中的一段包含撷取客户端屏幕解析度的JavaScript描述读取客户端的屏幕解析度。Then, the web server receives a browsing request from the client (step 203). When the client needs to browse the web, it can generate a browsing request to browse a specific web page through the browser at the local end. After the web server receives the browsing request, it will then The webpage corresponding to the browsing request is retrieved (step 204), and the screen resolution used by the client is read from the client (step 205). It should be noted that after the web server retrieves the webpage corresponding to the browsing request, it will read the screen resolution of the client from a section of the JavaScript description in the retrieved webpage that contains the screen resolution of the client.

当网页服务器取得客户端的屏幕解析度后,网页服务器将接着读取撷取的网页的各字体大小物理值,并根据客户端的屏幕解析度查询对应表以取得与客户端的屏幕解析度对应的屏幕宽度(步骤206),然后网页服务器再根据客户端的屏幕解析度的横向解析度与对应的屏幕宽度的比值乘以各字体大小物理值,以取得各字体大小浏览值并产生更新网页(步骤207)。举例来说,假设1024x 768的屏幕解析度对应的屏幕宽度为304.8mm,由于横向解析度为1024,则欲显示1mm的宽度时需使用到3.36px,因此若欲显示字体大小物理值为4.32mm见方的文字时,根据1024px与304.8mm的比例可以换算出需要使用14.5px的字体大小浏览值。需要特别说明的是,字体大小物理值系为显示网页文字时的实际大小,而字体大小浏览值除了可以是像素(px)值,也可以是以调变字体大小(em)或浏览器预设字体大小百分比例(%)。值得注意的是,由于在偶数像素(px)如:14、16、18...的情况下显示效果较佳,因此当字体大小浏览值为像素(px)时,可以仅取偶数点数值作为字体大小浏览值。After the web server obtains the screen resolution of the client, the web server will then read the physical value of each font size of the captured web page, and query the corresponding table according to the screen resolution of the client to obtain the screen width corresponding to the screen resolution of the client (step 206), then the web server multiplies the physical values of the font sizes according to the ratio of the horizontal resolution of the client's screen resolution and the corresponding screen width, to obtain the browsing values of the font sizes and generate an updated webpage (step 207). For example, assuming that the screen resolution of 1024x 768 corresponds to a screen width of 304.8mm, since the horizontal resolution is 1024, it needs to use 3.36px to display a width of 1mm, so if the physical value of the font size to be displayed is 4.32mm For square text, according to the ratio of 1024px to 304.8mm, it can be converted to a font size browsing value of 14.5px. It should be noted that the physical value of the font size is the actual size when displaying the text on the web page, and the browsing value of the font size can not only be the pixel (px) value, but also can be adjusted font size (em) or browser preset Font size percentage (%). It is worth noting that since the display effect is better in the case of even pixels (px) such as: 14, 16, 18..., when the font size browse value is in pixels (px), you can only take the value of even points as Font size browse value.

网页服务器将字体大小物理值转换为字体大小浏览值后,可以直接产生更新网页。当直接以像素(px)值产生更新网页时,客户端浏览器解析网页并显示的过程中,网页的字体大小将以px的形式直接显示,而当将以调变字体大小(em)或浏览器预设字体大小百分比例(%)产生更新网页时,浏览器解析网页并显示后客户端仍然可以通过浏览器的设定再对网页文字进行二次缩放,借此也使网页字体显示大小更符合客户端的浏览需求。After the web server converts the font size physical value into the font size browsing value, it can directly generate an updated web page. When the updated webpage is generated directly with pixel (px) value, during the process of parsing and displaying the webpage by the client browser, the font size of the webpage will be directly displayed in the form of px, and when the font size (em) or browsing When the browser default font size percentage (%) is generated to update the webpage, after the browser parses and displays the webpage, the client can still re-scale the webpage text through the browser settings, so as to make the font display size of the webpage smaller Meet the browsing needs of the client.

最后,网页服务器将更新网页传送给客户端并由客户端的浏览器解析后进行显示(步骤207)。Finally, the web server transmits the updated web page to the client and displays it after being parsed by the browser of the client (step 207).

接下来,将以一实施例搭配本发明的图式来说明本发明的详细实施方式。Next, the detailed implementation of the present invention will be described with an embodiment together with the drawings of the present invention.

假设有一应用有本发明的网页服务器,其预先建立有包含至少一屏幕解析度及与各屏幕解析度对应的屏幕宽度的对应表,如图3的对应表301所示,不同的屏幕解析度对应有不同的屏幕宽度,而借由不同的横向解析度及屏幕宽度可以取得一个比例。网页服务器当中除了建立有对应表外,也储存有至少一网页,各网页中包含至少一字体大小物理值的显示属性。举例来说,假设网页服务器中储存的网页为HTML网页,而假设有一第一网页其网页标题需要显示的实际字体大小为3mm,则其字体大小物理值可以设定为3mm。Assuming that there is a web server with the present invention applied thereto, it has pre-established a corresponding table including at least one screen resolution and the screen width corresponding to each screen resolution, as shown in the corresponding table 301 of FIG. 3 , different screen resolutions correspond to There are different screen widths, and a ratio can be obtained with different horizontal resolutions and screen widths. In addition to establishing a corresponding table in the webpage server, at least one webpage is also stored, and each webpage includes at least one display attribute of a font size physical value. For example, assuming that the webpage stored in the webpage server is an HTML webpage, and assuming that there is a first webpage whose title needs to be displayed with an actual font size of 3mm, the physical value of the font size can be set as 3mm.

假设现有一第一客户端其所使用的解析度为1024x 768,当第一客户端通过本地端的浏览器产生浏览请求并传送到网页服务器时,网页服务器将会根据浏览请求撷取对应的网页,并通过网页的一段JavaScript描述取得第一客户端的屏幕解析度。假设使用者欲浏览第一网页,则网页服务器撷取了第一网页后,首先将读取第一网页中的字体大小物理值的显示属性,接着根据1024x 768的屏幕解析度查询对应表取得屏幕宽度304.8mm。取得屏幕宽度后,根据第一客户端屏幕解析度的横向解析度与屏幕宽度的比例将字体大小物理值转换为字体大小浏览值。举前述第一网页其网页标题中字体大小物理值的显示属性为3mm的例子来说,由于欲显示的实际大小为3mm,根据第一客户端屏幕解析度的横向解析度与屏幕宽度的比例可求出字体大小浏览值应采取10.07px。由于在一般的浏览器解析过程中以偶数点数的px值所显示出的字体大小会有较佳的显示效果,因此取字体大小浏览值时,也可以仅取偶数点数的px值取代原来的字体大小物理值并产生更新网页。Assume that there is an existing first client with a resolution of 1024x768. When the first client generates a browsing request through the local browser and sends it to the web server, the web server will retrieve the corresponding web page according to the browsing request. And obtain the screen resolution of the first client through a JavaScript description of the webpage. Assuming that the user wants to browse the first web page, after the web server retrieves the first web page, it will first read the display attribute of the font size physical value in the first web page, and then query the corresponding table according to the screen resolution of 1024x768 to obtain the screen Width 304.8mm. After obtaining the screen width, convert the font size physical value into the font size browsing value according to the ratio of the horizontal resolution of the screen resolution of the first client to the screen width. Take the example in which the display attribute of the font size physical value in the title of the first webpage is 3mm, since the actual size to be displayed is 3mm, according to the ratio of the horizontal resolution of the screen resolution of the first client to the screen width, it can be Find the font size browser value should take 10.07px. Since the font size displayed with the px value of even points will have a better display effect in the general browser parsing process, when taking the font size browsing value, it is also possible to replace the original font with only the px value of even points Size the physical value and generate an update page.

需要特别说明的是,网页服务器除了可以直接像素(px)值作为字体大小浏览值产生更新网页外,也可以用调变字体大小(em)或浏览器预设字体大小百分比例(%)作为字体大小浏览值产生更新网页。当直接以像素(px)值产生更新网页时,客户端浏览器解析网页并显示的过程中,网页的字体大小将以px的形式直接显示,而当以调变字体大小(em)或浏览器预设字体大小百分比例(%)产生更新网页时,浏览器解析网页并显示后客户端仍然可以通过浏览器的设定再对网页文字进行二次缩放,借此也使网页字体显示大小更符合客户端的浏览需求。It should be noted that, in addition to directly using the pixel (px) value as the font size browsing value to generate an updated webpage, the web server can also use the adjusted font size (em) or the browser’s default font size percentage (%) as the font The size browse value generates an updated page. When the updated webpage is generated directly with pixel (px) value, the font size of the webpage will be directly displayed in px during the process of parsing and displaying the webpage by the client browser, and when the font size (em) or browser When the default font size percentage (%) is generated to update the webpage, after the browser parses and displays the webpage, the client can still re-scale the text on the webpage through the browser settings, so as to make the font size of the webpage more suitable Client browsing needs.

最后,网页服务器将网页传送到第一客户端,经过第一客户端的浏览器解析后,将可显示出标题字体大小为3mm的网页。假设现有一第二客户端使用的是与第一客户端不同的屏幕解析度1280x 1024,则当第二客户端同样欲浏览第一网页时,网页服务器同样会先查询对应1280x 1024屏幕解析度的屏幕宽度,再根据屏幕解析度的横向解析度与屏幕宽度的比例将字体大小物理值转换为字体大小浏览值再产生更新网页,并传送到第二客户端,由第二客户端的浏览器解析过后进行显示。借此,第一客户端与第二客户端虽然使用不同屏幕解析度浏览网页,但对于第一客户端与第二客户端来说,第一网页的标题字体大小都会为3mm,使得于不同显示终端上仍然能显示一致的网页字体大小,提升了网页字体的显示效果。Finally, the webpage server transmits the webpage to the first client, and after being parsed by the browser of the first client, a webpage with a title font size of 3mm can be displayed. Assuming that the existing second client uses a different screen resolution of 1280x 1024 from the first client, then when the second client also wants to browse the first web page, the web server will first query the screen resolution corresponding to 1280x 1024 Screen width, and then according to the ratio of the horizontal resolution of the screen resolution to the screen width, the font size physical value is converted into the font size browsing value, and then an updated web page is generated and sent to the second client, which is parsed by the browser of the second client to display. In this way, although the first client and the second client use different screen resolutions to browse the webpage, for the first client and the second client, the font size of the title of the first webpage will be 3mm, so that different display The terminal can still display the same webpage font size, which improves the display effect of webpage fonts.

虽然本发明所公开的实施方式如上,惟所述的内容并非用以直接限定本发明的专利保护范围。任何本发明所属技术领域中普通技术人员,在不脱离本发明所公开的精神和范围的前提下,可以在实施的形式上及细节上作些许的更动。本发明的专利保护范围,仍须以所附的权利要求书所界定者为准。Although the disclosed embodiments of the present invention are as above, the content described is not intended to directly limit the patent protection scope of the present invention. Any person skilled in the technical field to which the present invention belongs can make some changes in the forms and details of the implementation without departing from the disclosed spirit and scope of the present invention. The scope of patent protection of the present invention must still be defined by the appended claims as the criterion.

Claims (6)

1.一种动态调整字体大小的网页提供系统,适用于一网页服务器中,其特征在于,包含:1. A webpage providing system for dynamically adjusting font size, suitable for a webpage server, characterized in that it includes: 一网页资料库,预先储存有包含至少一字体大小物理值的至少一网页;A web page database, pre-stored with at least one web page including at least one font size physical value; 一接收模块,用以自一客户端接收一浏览请求;A receiving module, used for receiving a browsing request from a client; 一撷取模块,用以撷取对应该浏览请求的该网页,及用以自该客户端读取该客户端所使用的屏幕解析度;A capture module, used to capture the webpage corresponding to the browsing request, and used to read the screen resolution used by the client from the client; 一转换模块,预先建立有一对应表,该对应表包含至少一该屏幕解析度及与该屏幕解析度对应的一屏幕宽度,该转换模块用以读取撷取的该网页的各该字体大小物理值,并根据该客户端的该屏幕解析度查询该对应表以取得与该客户端的该屏幕解析度对应的该屏幕宽度,再根据该客户端的该屏幕解析度的横向解析度与对应的该屏幕宽度的比值乘以各该字体大小物理值,以取得各字体大小浏览值并产生一更新网页;及A conversion module, which establishes a correspondence table in advance, and the correspondence table includes at least one screen resolution and a screen width corresponding to the screen resolution, and the conversion module is used to read the font size physical value, and query the corresponding table according to the screen resolution of the client to obtain the screen width corresponding to the screen resolution of the client, and then according to the horizontal resolution of the screen resolution of the client and the corresponding screen width Multiply the ratio of each font size by the physical value of each font size to obtain the browsing value of each font size and generate an updated web page; and 一传送模块,用以将该更新网页传送给该客户端并由该客户端的浏览器解析后进行显示。A transmission module is used for transmitting the update webpage to the client and displaying it after being parsed by the browser of the client. 2.如权利要求1所述的动态调整字体大小的网页提供系统,其特征在于,各该字体大小浏览值系为像素、调变字体大小或浏览器预设字体大小百分比例。2. The system for providing a web page with dynamically adjusted font size as claimed in claim 1, wherein each browse value of the font size is a pixel, a modified font size, or a browser preset font size percentage. 3.如权利要求2所述的动态调整字体大小的网页提供系统,其特征在于,当该字体大小浏览值为像素时仅取用偶数点数值。3. The webpage providing system for dynamically adjusting font size as claimed in claim 2, characterized in that, when the browsing value of the font size is in pixels, only an even point value is used. 4.一种动态调整字体大小的网页提供方法,适用于一网页服务器中,其特征在于,包含下列步骤:4. A webpage providing method for dynamically adjusting font size, suitable for a webpage server, is characterized in that it comprises the following steps: 预先于该网络服务器建立一对应表,该对应表包含至少一屏幕解析度及与各该屏幕解析度对应的一屏幕宽度;Establishing a correspondence table in the network server in advance, the correspondence table includes at least one screen resolution and a screen width corresponding to each of the screen resolutions; 预先于该网页服务器储存至少一网页,其中各该网页包含至少一字体大小物理值;storing at least one webpage in advance on the webpage server, wherein each of the webpages includes at least one font size physical value; 该网页服务器自一客户端接收一浏览请求;The web server receives a browsing request from a client; 该网页服务器撷取对应该浏览请求的该网页;The web server retrieves the web page corresponding to the browsing request; 该网页服务器自该客户端读取该客户端所使用的该屏幕解析度;The web server reads from the client the screen resolution used by the client; 该网页服务器读取撷取的该网页的各该字体大小物理值,并根据该客户端的该屏幕解析度查询该对应表以取得与该客户端的该屏幕解析度对应的该屏幕宽度;The web server reads the retrieved physical values of font sizes of the webpage, and queries the corresponding table according to the screen resolution of the client to obtain the screen width corresponding to the screen resolution of the client; 该网页服务器根据该客户端的该屏幕解析度的横向解析度与对应的该屏幕宽度的比值乘以各该字体大小物理值,以取得各字体大小浏览值并产生一更新网页;及The web server multiplies the physical value of each font size according to the ratio of the horizontal resolution of the screen resolution of the client to the corresponding screen width, so as to obtain browsing values of each font size and generate an updated webpage; and 该网页服务器将该更新网页传送给该客户端并由该客户端的浏览器解析后进行显示。The webpage server transmits the updated webpage to the client and displays it after being parsed by the browser of the client. 5.如权利要求4所述的动态调整字体大小的网页提供方法,其特征在于,各该字体大小浏览值系为像素、调变字体大小或浏览器预设字体大小百分比例。5 . The method for providing a web page with dynamically adjusted font size as claimed in claim 4 , wherein each browsing value of the font size is a pixel, a modified font size, or a browser preset font size percentage. 5 . 6.如权利要求5所述的动态调整字体大小的网页提供方法,其特征在于,当该字体大小浏览值系为像素时仅取用偶数点数值。6. The method for providing a web page with dynamically adjusted font size as claimed in claim 5, wherein when the browse value of the font size is pixels, only an even point value is used.
CN2010105004706A 2010-09-29 2010-09-29 Webpage providing system and method for dynamically adjusting font size Pending CN102436452A (en)

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 font size

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 font size

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 font size

Country Status (1)

Country Link
CN (1) CN102436452A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
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

Cited By (6)

* Cited by examiner, † Cited by third party
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
CN102684986B (en) Method and system for displaying picture by terminal
CN101996206B (en) Method, device and system for displaying web page
US7810049B2 (en) System and method for web navigation using images
CN104063460B (en) A kind of method and apparatus loading webpage in a browser
US9071651B2 (en) Dynamic content delivery to network-enabled static display device
US8156418B2 (en) Image acquisition from dynamic content for delivery to network-enabled static display devices
US8731283B2 (en) Information processing apparatus, information processing method and information processing program
US8914355B1 (en) Display-content alteration for user interface devices
US20110066678A1 (en) Webpage browsing system, server, webpage browsing method, program and recording medium for the same
JP4811069B2 (en) Information presentation device, information presentation method, and information presentation processing program
CN102436452A (en) Webpage providing system and method for dynamically adjusting font size
CN103353886A (en) Method and system for previewing webpage
CN101526953A (en) WWW transformation technology
US20130007586A1 (en) Method and system for creating and using web feed display templates
US9117314B2 (en) Information output apparatus, method, and recording medium for displaying information on a video display
CN102541836B (en) A kind of method and device adjusting format file layout
CN102364460A (en) Automatic page amplification method and system based on mobile terminal
JP2007233659A (en) Information distribution system for network service
CN102346738A (en) Customized web page processing device and method
US20170168997A1 (en) System and computer-implemented method for incorporating an image into a page of content for transmission from a web-site
CN114297544A (en) A remote browsing method, device, device and storage medium
EP3080722A1 (en) Web page rendering on wireless devices
EP2423837A1 (en) Method and system for viewing web page and computer program product thereof
KR100869885B1 (en) Wireless Internet service system and method for browsing web page of mobile terminal
CN109710783B (en) Picture loading method and device, storage medium and server

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