TW201837738A - Method of displaying font when changing the content of web page - Google Patents

Method of displaying font when changing the content of web page Download PDF

Info

Publication number
TW201837738A
TW201837738A TW106110725A TW106110725A TW201837738A TW 201837738 A TW201837738 A TW 201837738A TW 106110725 A TW106110725 A TW 106110725A TW 106110725 A TW106110725 A TW 106110725A TW 201837738 A TW201837738 A TW 201837738A
Authority
TW
Taiwan
Prior art keywords
font
information
webpage
browser
content
Prior art date
Application number
TW106110725A
Other languages
Chinese (zh)
Inventor
葉俊麟
Original Assignee
亞太戲網股份有限公司
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 亞太戲網股份有限公司 filed Critical 亞太戲網股份有限公司
Priority to TW106110725A priority Critical patent/TW201837738A/en
Priority to CN201710301857.0A priority patent/CN108664537A/en
Publication of TW201837738A publication Critical patent/TW201837738A/en

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

A method of displaying font when changing the content of a web page includes the following steps. First, a page information including a first code information and a first font information is downloaded to a browsing end. A font-display program of the browsing end downloads a first font subset from a font server. When the web page content is changed on the browser side to generate a second code information and a font image of the second code information which is not appeared in the first font subset and the second code information is corresponding to the second font information. The browsing end sends a web page address, the second code information, and the second font information to the font server. The font generation module generates a corresponding second font subset. The second second font subset is downloaded and the browsing end presents the second code information and the second font information on the web page according to the second font subset.

Description

於網頁的內容變更時顯示字型的方法Method of displaying fonts when the content of a web page is changed

本發明是關於一種於網頁的內容變更時顯示字型的方法,尤其是針對亞洲語系字型在網頁顯示字型的方法。The present invention relates to a method for displaying a font when a content of a web page is changed, and more particularly to a method for displaying a font on a web page for an Asian font.

隨著資訊科技的不斷進展,人的生活可以說是已經離不開網際網路。相較於全球資訊網(World Wide Web)發展的早期,目前網頁上所呈現的內容可以說是愈來愈豐富。舉例來說,在早期瀏覽器端的網頁所呈現文字的字型絕大部分是由超文件標示語言(HyperText Markup Language,簡稱:HTML)來定義,然而隨著網頁內容愈來愈多元與豐富的趨勢下,已有業者開始提供根據網頁需求透過網際網路下載不同字型檔案的服務。這樣一來,即使瀏覽器端未安裝該字型的樣式,也可讓使用者在瀏覽網頁時享受到多樣化的字型。然而,亞洲文字字型的檔案通常很大,需花費較多的時間下載,從而增加使用者的等待時間。 台灣專利I427534 藉由圖騰伺服器產生網頁圖騰之方法中揭露之方法,是以圖騰顯示程式與圖騰伺服器通訊後,以該網頁之字碼及字型資訊來取得子集合字型,以縮小字型檔案達到加快下載呈現速度之目的。該方法雖較整個字型檔案下載快速,但在與圖騰伺服器通訊仍有等待時間,依照網路品質與頻寬不同約需等待數秒,等待時間中間會有數秒顯示為系統預設字型,等待子集合字型檔案完全下載完成後,方能正確顯示出設定的字型樣式。因此,該專利的專利權人於之後在專利申請案105115119中提出加速網頁顯示亞洲語系字型的方法,以讓瀏覽者省略中間的等待時間,能直接瀏覽到網頁設定的字型樣式。然而,某些網頁在使用者往下拉動時會即時更新資料,又或者某些網頁與使用者會進行互動從而產生新的內容。然而,在專利申請案105115119中並未考慮到網頁的內容即時更新的情形,對於網頁即時更新所產生的內容,其無法支援。也就是說,網頁即時更新所產生的內容無法享有多樣化的字型。With the continuous advancement of information technology, people's lives can be said to be inseparable from the Internet. Compared to the early days of the development of the World Wide Web, the content presented on the current web page can be said to be more and more abundant. For example, most of the fonts displayed on web pages in the early browsers are defined by the HyperText Markup Language (HTML), but as the content of the webpage becomes more diverse and richer, Under the existing business, users have begun to provide services for downloading different font files through the Internet according to the needs of webpages. In this way, even if the style of the font is not installed on the browser side, the user can enjoy a variety of fonts while browsing the webpage. However, Asian text fonts are usually large and take more time to download, increasing the user's waiting time. Taiwan Patent I427534 The method disclosed in the method for generating a web totem by a totem server is that after the totem display program communicates with the totem server, the sub-set font is obtained by using the font and font information of the web page to reduce the font size. The file achieves the purpose of speeding up the download and rendering. Although the method downloads faster than the entire font file, there is still waiting time for communication with the totem server. It takes about several seconds depending on the network quality and bandwidth, and there are several seconds in the middle of the waiting time to display the system default font. After the sub-set font file is completely downloaded, the set font style can be displayed correctly. Therefore, the patentee of the patent later proposes a method for accelerating the display of the Asian language font on the webpage in the patent application 105115119, so that the viewer can omit the waiting time in the middle and can directly browse to the font style set by the webpage. However, some web pages update the data as soon as the user pulls down, or some web pages interact with the user to generate new content. However, in the patent application 105115119, the situation in which the content of the webpage is updated in real time is not considered, and the content generated by the instant update of the webpage cannot be supported. In other words, the content generated by the instant update of the webpage cannot enjoy a variety of fonts.

為了解決上述之問題,本發明的目的在於提供一種於網頁的內容變更時顯示字型的方法,以使網頁即時更新所產生的內容能享有多樣化的字型。 基於上述目的與其他目的,本發明提供一種於網頁的內容變更時顯示字型的方法,包括以下的步驟。首先,從對應到一網頁網址的一網頁源下載至少一網頁資訊到一瀏覽器端,該網頁資訊包括一連接資訊、至少一第一字碼資訊、與一第一字型資訊,該第一字碼資訊對應到第一字型資訊。瀏覽器端根據連接資訊從一字型伺服器下載一字型顯示程式,之後字型顯示程式至字型伺服器下載一第一子集合字型檔案,且瀏覽器端根據第一子集合字型檔案顯示一網頁。於瀏覽器端更新網頁的內容而產生至少一第二字碼資訊,該第二字碼資訊所對應到的字型圖像未出現在第一子集合字型檔案中,且第二字碼資訊是對應到一第二字型資訊。接著,重新分析全部的網頁資訊。再來,瀏覽器端將網頁網址、第一字碼資訊、第二字碼資訊、第一字型資訊、與第二字型資訊傳送至字型伺服器。字型產生模組根據網頁網址、第一字碼資訊、第二字碼資訊、第一字型資訊、與第二字型資訊產生至少一對應的第二子集合字型檔案。接下來,下載第二子集合字型檔案至瀏覽器端。然後,瀏覽器端至少根據第二子集合字型檔案將第一字碼資訊、第二字碼資訊、第一字型資訊、與第二字型資訊呈現於網頁上。 基於上述目的與其他目的,本發明再提供一種於網頁的內容變更時顯示字型的方法,包括以下的步驟。首先,從對應到一網頁網址的一網頁源下載至少一網頁資訊到一瀏覽器端,該網頁資訊包括一連接資訊、至少一第一字碼資訊、與一第一字型資訊,該第一字碼資訊對應到第一字型資訊。瀏覽器端根據連接資訊從一字型伺服器下載一字型顯示程式,之後字型顯示程式至字型伺服器下載一第一子集合字型檔案,且瀏覽器端根據第一子集合字型檔案顯示一網頁。於瀏覽器端更新網頁的內容而產生一第二字碼資訊,該第二字碼資訊所對應到的字型圖像未出現在第一子集合字型檔案中,且第二字碼資訊是對應到一第二字型資訊。接著,字型顯示程式分析網頁資訊中的第二字碼資訊或第二字型資訊。再來,瀏覽器端將網頁網址、第二字碼資訊、與第二字型資訊傳送至字型伺服器。字型產生模組根據網頁網址、第二字碼資訊、與第二字型資訊產生至少一對應的第二子集合字型檔案。接下來,下載第二子集合字型檔案至瀏覽器端。然後,瀏覽器端至少根據第二子集合字型檔案將第二字碼資訊與第二字型資訊呈現於該網頁上。 在上述的於網頁的內容變更時顯示字型的方法中,如第二字型資訊相同於第一字型資訊,下載之第二子集合字型檔將覆蓋第一子集合字型檔效果。 在上述的於網頁的內容變更時顯示字型的方法中,如第二字型資訊相同於第一字型資訊,可於該瀏覽器端,第二字型資訊的名稱不同於第一字型資訊的名稱。而且,第二字型資訊的名稱是改成第一字型資訊的名稱後傳送至字型伺服器。此外,於下載第二子集合字型檔案至瀏覽器端後,第二子集合字型檔案中該第二字型資訊的名稱被改回第二字型資訊原有的名稱。In order to solve the above problems, an object of the present invention is to provide a method for displaying a font when a content of a web page is changed, so that a content generated by an instant update of the web page can enjoy a variety of fonts. Based on the above objects and other objects, the present invention provides a method of displaying a font when content of a web page is changed, including the following steps. First, downloading at least one webpage information from a webpage source corresponding to a webpage URL to a browser end, the webpage information includes a connection information, at least a first wordcode information, and a first font type information, the first character code The information corresponds to the first type of information. The browser side downloads a font display program from the font server according to the connection information, and then the font display program to the font server downloads a first sub-set font file, and the browser end is based on the first sub-set font type. The file displays a web page. The at least one second word code information is generated by updating the content of the webpage on the browser side, and the font image corresponding to the second word code information does not appear in the first sub-set font file, and the second word code information is corresponding to A second type of information. Then, re-analyze all the webpage information. Then, the browser transmits the webpage URL, the first code information, the second code information, the first font information, and the second font information to the font server. The font generation module generates at least one corresponding second subset font file according to the webpage URL, the first character code information, the second character code information, the first font information, and the second font information. Next, download the second sub-set font file to the browser. Then, the browser side presents the first word code information, the second word code information, the first font information, and the second font information to the webpage according to at least the second subset font file. Based on the above and other objects, the present invention further provides a method for displaying a font when a content of a web page is changed, including the following steps. First, downloading at least one webpage information from a webpage source corresponding to a webpage URL to a browser end, the webpage information includes a connection information, at least a first wordcode information, and a first font type information, the first character code The information corresponds to the first type of information. The browser side downloads a font display program from the font server according to the connection information, and then the font display program to the font server downloads a first sub-set font file, and the browser end is based on the first sub-set font type. The file displays a web page. The second word code information is generated by updating the content of the webpage on the browser side, and the font image corresponding to the second word code information does not appear in the first subset font file, and the second word code information corresponds to one Second type information. Then, the font display program analyzes the second word information or the second type information in the webpage information. Then, the browser transmits the webpage URL, the second code information, and the second font information to the font server. The font generation module generates at least one corresponding second subset font file according to the webpage web address, the second character code information, and the second font information. Next, download the second sub-set font file to the browser. Then, the browser side presents the second word information and the second font information to the web page according to at least the second subset font file. In the above method for displaying a font when the content of the webpage is changed, if the second font information is the same as the first font information, the downloaded second sub-set font file will overwrite the first sub-set font file effect. In the above method for displaying a font when the content of the webpage is changed, if the second font information is the same as the first font information, the name of the second font information may be different from the first font on the browser side. The name of the information. Moreover, the name of the second font information is changed to the name of the first font information and transmitted to the font server. In addition, after downloading the second sub-set font file to the browser end, the name of the second font information in the second sub-set font file is changed back to the original name of the second font information.

請參照圖1,圖1所繪示為本發明之系統的實施例的示意圖。在本實施例中,系統100包括一網頁源110、一瀏覽器端120、與一字型伺服器130,其中網頁源110、瀏覽器端120、與字型伺服器130之間是藉由網際網路2而彼此通訊連接。網頁源110是由至少一個(在本實施例為多個)伺服主機112所構成,這些伺服主機112可以置於一處或分散於多處。另外,瀏覽器端120在本實施例中為一桌上型電腦,此桌上型電腦包括一主機123與一螢幕124;在其他實施例中,瀏覽器端120也可以為一筆記型電腦、一智慧型手機、一平板電腦、一All in One電腦或其他可以瀏覽網頁的電子裝置。此外,字型伺服器130也可由一個或多個伺服主機所構成,且字型伺服器130包括一字型產生模組132與一原始字型資料庫134,關於字型產生模組132與原始字型資料庫134的詳細運作方式可參考專利申請案105115119中的內容。 請同時參照圖2A與圖2B,圖2A與圖2B所繪示為本發明之於網頁的內容變更時顯示字型的方法的第一實施例的流程圖。首先,實施步驟S110,使用者於瀏覽器端120將瀏覽器開啟,在本實施例中,瀏覽器可以為Internet Explorer、Firefox、Opera Web Browser、或Google Chrome等。再來,實施步驟S120,之後透過超連接的方式連接到網頁源,這樣螢幕124就會顯示出如圖3A所示的網頁,圖3A所示的網頁網址:http://www.abc.com.tw/。需注意的是,圖3A所示網頁網址與網頁內容僅是示意,不代表真實網址,且網頁所示的內容也僅用於本申請案說明之用。此外,如圖4A所示,會從網頁源110下載到瀏覽器端120的網頁資訊包括一連接資訊、至少一第一字碼資訊、與一第一字型資訊,其中連接資訊是指連接到字型伺服器130的網址。另外,第一字碼資訊則例如是圖3A所示網頁30中的『你們好嗎』,而第一字型資訊則例如是指上述字碼所使用的字型,亦即第一字碼資訊是對應到第一字型資訊,例如為:noto-1字型。 之後,實施步驟S130,如圖4B所示,瀏覽器端120根據連結資訊連接到字型伺服器130後,便會從字型伺服器130下載字型顯示程式。再來,實施步驟S140,位於瀏覽器端120的字型顯示程式會根據至少一網頁網址(即圖3A所示的網頁網址:http://www.abc.com.tw/)與至少一第一字型資訊(亦即:noto-1字型),而產生至少一第一定址資訊。 然後,實施步驟S150,如圖4C所示,瀏覽器端120根據第一定址資訊從字型伺服器130下載一第一子集合字型檔案。在本實施例中,第一子集合字型檔案較佳是只包括對應到該網頁30中所示字碼的字型圖像,而非全部的字型圖像(亦即noto-1字型的全部字型圖像),這樣可增加下載的速度。然後,實施步驟S160,瀏覽器端120的主機123會對第一子集合字型檔案進行解譯,以產生一第一解釋結果,此第一解釋結果會呈現於瀏覽器端120的網頁上。詳細地說,瀏覽器端120會根據第一子集合字型檔案,而使網頁上的字碼(部分或全部)的字型會呈現對應到第一子集合字型檔案的字型。再來,實施步驟S170,由於使用者的行為而使網頁產生新的內容。例如,某些網頁(例如包括有Javascript程式碼的網頁)會與使用者互動而產生即時的內容更新。又或者,瀏覽器端120的某些應用程式在操作後會於網頁產生新的內容。舉例來說,如圖3A所示,原本網頁資訊有含『你們好嗎』這四個字,且其所呈現的字型是對應到第一字型資訊(如:noto-1字型)。後來,如圖3B所示,因為與使用者互動的關係而產生『今天吃什麼』這五個字,且『今天吃什麼』這五個字是與『你們好嗎』這四個字並排在一起。由於『今天吃什麼』這五個字所對應到的字型圖像並未包含在第一子集合字型檔案中,因此瀏覽器端120所呈現出的『今天吃什麼』的字型並非是由字型伺服器130所提供,而只能是瀏覽器端120所預設的字型,相較之下比較不美觀,這樣一來會影響使用者的觀感。在專利申請案105115119中,這樣的問題是沒有辦法解決的,但本實施例則會透過下述的流程解決問題。 請參照步驟S180,字型顯示程式重新分析全部的網頁資訊。為了執行此步驟,網頁的設計者在編輯網頁時可加入相關的程式碼,指定當網頁的內容更新時,更新的內容所對應到的字型。例如,請參照圖6A,其是利用HTML的方式指定當網頁的內容更新時,更新的內容所對應到的字型,又或者可用CSS的方式指定更新內容的字型(如圖6B所示)。因此,當網頁更新後,瀏覽器端120便會重新分析全部網頁的資訊。在本實施例中,例如是用_jf.flush() 函數重新分析全部網頁,其是會再分析全部網頁的資訊一次,以擷取網頁資訊中的字碼資訊與字型資訊。在此,字碼資訊包括第一字碼資訊與第二字碼資訊,而字型資訊包括第一字型資訊與第二字型資訊。在本實施例中,第二字碼資訊即為網頁更新後的內容,亦即:『今天吃什麼』這五個字。而在此實施例中,第二字型資訊是與第一字型資訊相同,也就是圖6A與圖6B所指的noto-1字型。 再來,請參照步驟S190與圖4D所示,因第二字型資訊是與第一字型資訊相同,會將網頁網址、第一字碼資訊加上第二字碼資訊、第一字型資訊與第二字型資訊傳送至字型伺服器130。而且,在本實施例中,因第二字型資訊是與第一字型資訊相同,故實際上是將網頁網址、第一字碼資訊、第二字碼資訊、第一字型資訊傳送至字型伺服器130。接著,實施步驟S210,字型伺服器130中的字型產生模組會根據所接受的訊息(亦即:網頁網址、第一字碼資訊加上第二字碼資訊、第一字型資訊或與第二字型資訊),而產生一第二子集合字型檔案。 之後,實施步驟S220,請同時參照圖4E,字型伺服器130將第二子集合字型檔案傳送到瀏覽器端120。然後,實施步驟S230,瀏覽器端120的主機123對第二子集合字型檔案進行解譯並產生一第二解譯結果,並將第二解譯結果呈現於網頁30上。這樣一來,原本呈現在網頁30上的『你們好嗎』與『今天吃什麼』就會呈現一樣的字型(如圖3C所示)。 在上述的實施例中,『你們好嗎』與『今天吃什麼』是呈現同樣的字型,也就是說第一字型資訊與第二字型資訊是相同的。然而,本領域具有通常知識者,也可將『你們好嗎』與『今天吃什麼』分別設定成不同的字型,例如將圖6A與圖6B所指的noto-1字型改為noto-2字型。也就是說,第一字型資訊與第二字型資訊是不同的。 此外,需注意的是,雖然在實施步驟S170時,『你們好嗎』雖已經以所欲的字型呈現在螢幕上,但當第二字型資訊是與第一字型資訊相同時,在實施步驟S220時,瀏覽器端120仍會重新載入『你們好嗎』的noto-1字型的字型圖像,而造成網路頻寬的浪費。而且,瀏覽器端120仍會對『你們好嗎』再次進行處理,也就是說,第二子集合字型檔案會覆蓋第一子集合字型檔案。這樣會導致:『你們好嗎』雖會保持原有的字型,但卻會在螢幕上呈現出閃爍的現象。 請同時參照圖5A與圖5B,圖5A與圖5B所繪示為本發明之於網頁顯示字型的方法的第二實施例的流程圖。由於圖5A與圖5B的步驟S110~步驟S170是與第一實施例相同,因此在本實施例中將標以相同的標號,並不再贅述。在網頁30因使用者互動而產生即時的更新後,執行步驟S380,分析網頁30即時更新後所產生的第二字碼資訊或第二字型資訊。為了執行此步驟,網頁的設計者在編輯網頁時可加入相關的程式碼,指定當網頁更新時,更新的內容所對應到的字型。例如,請參照圖6C,其是利用CSS的方式指定當網頁更新時,更新的內容所對應到的字型。在本實施例中,例如是用_jf.flushfont(“noto-2”)函數指定處理網頁30中的 noto-2字型(亦即:第二字型資訊),其是會分析網頁30中使用到noto-2字型所對應到的字碼(包括第二字碼資訊,亦即:『今天吃什麼』),以擷取網頁資訊中的第二字型資訊與第二字型資訊所對應到的字碼資訊。又或者,例如是用_jf.flushcss(“.hello”) 函數指定處理網頁中的class=“hello”元素,分析class=“hello”元素中所使用的字型(noto-2字型,亦即:第二字型資訊)與第二字碼資訊(亦即:『今天吃什麼』)。 再來,請參照步驟S390與圖7A,將網頁網址、第二字碼資訊、與第二字型資訊傳送至字型伺服器130。接著,實施步驟S410,字型伺服器130中的字型產生模組會根據所接受的訊息(亦即:網頁網址、第二字碼資訊、與第二字型資訊),而產生一第二子集合字型檔案。 之後,實施步驟S420,請同時參照圖7B,字型伺服器130將第二子集合字型檔案傳送到瀏覽器端120。然後,實施步驟S430,瀏覽器端120的主機123對第二子集合字型檔案進行解譯並產生一第二解譯結果,並將第二解譯結果呈現於網頁30上。這樣一來,原本呈現在網頁30上的『今天吃什麼』就會呈現所欲的字型(本實施例中為noto-2字型)。 然而,在第二實施例中,若第一字型資訊與第二字型資訊是相同的,且是用_jf.flushfont(“noto-1”)函數來分析網頁30,於步驟S380中仍會分析第一字型資訊,而於步驟S390中仍會將第一字型資訊傳送到字型伺服器130。因此,於步驟S430中瀏覽器端120仍會重新載入第一字型資訊,且瀏覽器端120仍會對『你們好嗎』再次進行處理,故仍會在螢幕上呈現出閃爍的現象。 為了解決若第一字型資訊與第二字型資訊是相同的,瀏覽器端120仍會重新載入第一字型資訊,且螢幕上呈現出閃爍的現象等問題。於第三實施例中,網頁的設計者在編輯網頁時,仍使第二字型資訊的名稱不同於第一字型資訊的名稱,如圖6A所示仍將第二字型資訊的名稱命名為“noto-2”。在執行步驟S390時,第二字型資訊的名稱“noto-2”是改成第一字型資訊的名稱“noto-1”後在傳送至字型伺服器130,相關的程式碼如圖6D所示。由於字型伺服器130所收到的是第一字型資訊的名稱“noto-1”,因此會將其當作第一字型資訊進行處理,因此所做成的第二子集合字型檔案,其中的第二字型資訊的名稱仍然為第一字型資訊的名稱“noto-1”。然而,在步驟S430中,第二子集合字型檔案中該第二字型資訊的名稱被改回該第二字型資訊原有的名稱,相關的程式碼如圖6E所示。由於第二字型資訊的名稱已被改回原有的名稱,故在步驟S430中僅會對『今天吃什麼』進行處理,『你們好嗎』不會有相關變動,故不會發生閃爍的現象。而且,這樣一來,網頁30在即時更新後,縱使『你們好嗎』與『今天吃什麼』是有相同的字型,也不會發生與『你們好嗎』相關的字碼資訊與字型資訊發生重複傳輸和處理事情。 本發明說明如上,然其並非用以限定本創作所主張之專利權利範圍。其專利保護範圍當視後附之申請專利範圍及其等同領域而定。凡本領域具有通常知識者,在不脫離本專利精神或範圍內,所作之更動或潤飾,均屬於本創作所揭示精神下所完成之等效改變或設計,且應包含在下述之申請專利範圍內。Please refer to FIG. 1. FIG. 1 is a schematic diagram of an embodiment of a system of the present invention. In this embodiment, the system 100 includes a webpage source 110, a browser end 120, and a font server 130. The webpage source 110, the browser end 120, and the font server 130 are connected by the internet. The network 2 is connected to each other. The web page source 110 is composed of at least one (in this embodiment, a plurality of) servo hosts 112, which may be placed in one place or distributed in multiple places. In addition, the browser terminal 120 is a desktop computer in this embodiment. The desktop computer includes a host 123 and a screen 124. In other embodiments, the browser terminal 120 can also be a notebook computer. A smart phone, a tablet, an All in One computer or other electronic device that can browse the web. In addition, the font server 130 can also be composed of one or more servo hosts, and the font server 130 includes a font generation module 132 and an original font database 134, and the font generation module 132 and the original The detailed operation of the font database 134 can be found in the patent application 105115119. Please refer to FIG. 2A and FIG. 2B simultaneously. FIG. 2A and FIG. 2B are flowcharts showing a first embodiment of a method for displaying a font when the content of a webpage is changed according to the present invention. First, in step S110, the user opens the browser on the browser end 120. In this embodiment, the browser may be Internet Explorer, Firefox, Opera Web Browser, or Google Chrome. Then, step S120 is implemented, and then connected to the webpage source through the hyperlink, so that the screen 124 displays the webpage as shown in FIG. 3A, and the webpage URL shown in FIG. 3A: http://www.abc.com .tw/. It should be noted that the webpage URL and the webpage content shown in FIG. 3A are only schematic and do not represent the real webpage, and the content shown on the webpage is only used for the description of the present application. In addition, as shown in FIG. 4A, the webpage information that is downloaded from the webpage source 110 to the browser terminal 120 includes a connection information, at least a first wordcode information, and a first font type information, wherein the connection information refers to the connection to the word. The URL of the type server 130. In addition, the first character code information is, for example, "How are you?" in the webpage 30 shown in FIG. 3A, and the first font information refers to, for example, the font used by the above-mentioned word code, that is, the first word code information corresponds to The first type of information, for example: noto-1 font. Thereafter, step S130 is implemented. As shown in FIG. 4B, after the browser end 120 is connected to the font server 130 according to the link information, the font display program is downloaded from the font server 130. Then, in step S140, the font display program located at the browser end 120 is based on at least one webpage URL (ie, the webpage URL shown in FIG. 3A: http://www.abc.com.tw/) and at least one A type of information (ie, noto-1 font), and at least one first addressing information is generated. Then, step S150 is implemented. As shown in FIG. 4C, the browser end 120 downloads a first subset font file from the font server 130 according to the first addressing information. In this embodiment, the first sub-set font file preferably includes only font images corresponding to the words shown in the web page 30, rather than all font images (ie, noto-1 fonts). All font images), which increases the speed of downloading. Then, in step S160, the host 123 of the browser end 120 interprets the first subset font file to generate a first interpretation result, and the first interpretation result is presented on the webpage of the browser end 120. In detail, the browser 120 may cause the font (partial or full) of the font on the webpage to present a font corresponding to the first subset font file according to the first subset font file. Then, in step S170, the web page generates new content due to the behavior of the user. For example, certain web pages (eg, web pages that include Javascript code) interact with the user to produce instant content updates. Alternatively, some applications of the browser 120 may generate new content on the webpage after the operation. For example, as shown in FIG. 3A, the original webpage information has the words "How are you?", and the fonts presented therein correspond to the first font information (for example, noto-1 font). Later, as shown in FIG. 3B, the five words "What to eat today" are generated because of the interaction with the user, and the words "What are you eating today" are side by side with the words "How are you?" together. Since the font image corresponding to the words "What to Eat Today" is not included in the first subset font file, the font "What to Eat Today" displayed by the browser 120 is not It is provided by the font server 130, but only the font type preset by the browser terminal 120, which is relatively unattractive, which may affect the user's perception. In Patent Application No. 105115119, such a problem is not solved, but the present embodiment solves the problem through the following process. Please refer to step S180, the font display program re-analyzes all webpage information. In order to perform this step, the designer of the web page can add the relevant code when editing the webpage, and specify the font corresponding to the updated content when the content of the webpage is updated. For example, please refer to FIG. 6A, which is a manner of specifying the font corresponding to the updated content when the content of the webpage is updated by using HTML, or specifying the font of the updated content by means of CSS (as shown in FIG. 6B). . Therefore, when the web page is updated, the browser 120 will re-analyze the information of all the web pages. In this embodiment, for example, the _jf.flush() function is used to re-analyze all the webpages, and the information of all the webpages is analyzed again to capture the word information and the font information in the webpage information. Here, the word information includes the first word information and the second word information, and the font information includes the first font information and the second font information. In this embodiment, the second word code information is the updated content of the webpage, that is, the words "What to eat today". In this embodiment, the second font information is the same as the first font information, that is, the noto-1 font type referred to in FIG. 6A and FIG. 6B. Then, referring to step S190 and FIG. 4D, since the second font information is the same as the first font information, the webpage URL, the first word information plus the second word information, the first font information and The second font information is transmitted to the font server 130. Moreover, in this embodiment, since the second font information is the same as the first font information, the webpage URL, the first wordcode information, the second wordcode information, and the first font information are actually transmitted to the font. Server 130. Next, in step S210, the font generation module in the font server 130 will be based on the accepted message (ie, the webpage URL, the first code information plus the second word information, the first font information or the first Two-character information), and a second sub-set font file is generated. Thereafter, step S220 is implemented. Referring to FIG. 4E at the same time, the font server 130 transmits the second subset font file to the browser terminal 120. Then, in step S230, the host 123 of the browser end 120 interprets the second subset font file and generates a second interpretation result, and presents the second interpretation result on the web page 30. In this way, "How are you" and "What to eat today" that were originally presented on the webpage 30 will present the same font (as shown in Figure 3C). In the above embodiment, "How are you" and "What to eat today" are the same font, that is, the first font information and the second font information are the same. However, those who have the usual knowledge in the field can also set "How are you" and "What to eat today" to different fonts, for example, change the noto-1 font referred to in Fig. 6A and Fig. 6B to noto- 2 font type. In other words, the first font information is different from the second font information. In addition, it should be noted that although in the implementation of step S170, "How are you" has been presented on the screen in the desired font, but when the second font information is the same as the first font information, When step S220 is implemented, the browser terminal 120 will reload the noto-1 font image of "How are you", which causes a waste of network bandwidth. Moreover, the browser side 120 will still process "How are you?", that is, the second sub-set font file will overwrite the first sub-set font file. This will result in: "How are you," although the original font will remain, but it will show a flashing phenomenon on the screen. Please refer to FIG. 5A and FIG. 5B simultaneously. FIG. 5A and FIG. 5B are flowcharts showing a second embodiment of the method for displaying a font on a webpage according to the present invention. The steps S110 to S170 of FIG. 5A and FIG. 5B are the same as those of the first embodiment, and therefore, the same reference numerals are used in the embodiment, and the description thereof will not be repeated. After the webpage 30 is immediately updated by the user interaction, step S380 is executed to analyze the second word information or the second font information generated after the webpage 30 is updated in real time. In order to perform this step, the designer of the web page can add relevant code when editing the webpage, and specify the font corresponding to the updated content when the webpage is updated. For example, please refer to FIG. 6C, which is a way of specifying the font corresponding to the updated content when the webpage is updated by means of CSS. In the present embodiment, for example, the noto-2 font (ie, the second font information) in the processing web page 30 is specified by the _jf.flushfont ("noto-2") function, which is analyzed in the web page 30. Use the word corresponding to the noto-2 font (including the second word information, ie: "What to eat today"), to capture the second font information and the second font information in the webpage information. Word information. Or, for example, use the _jf.flushcss(".hello") function to specify the class="hello" element in the processing web page, and analyze the font used in the class="hello" element (noto-2 font, also Namely: the second type of information) and the second word information (ie: "What to eat today"). Then, referring to step S390 and FIG. 7A, the webpage web address, the second character code information, and the second font information are transmitted to the font server 130. Next, in step S410, the font generation module in the font server 130 generates a second sub-subject based on the accepted message (ie, webpage URL, second-word information, and second font information). Collect font files. Thereafter, step S420 is implemented. Referring to FIG. 7B at the same time, the font server 130 transmits the second subset font file to the browser terminal 120. Then, in step S430, the host 123 of the browser end 120 interprets the second subset font file and generates a second interpretation result, and presents the second interpretation result on the web page 30. In this way, what "what is eaten today" originally presented on the web page 30 will present the desired font (noto-2 font in this embodiment). However, in the second embodiment, if the first font information and the second font information are the same, and the webpage 30 is analyzed by the _jf.flushfont ("noto-1") function, the processing is still performed in step S380. The first font information is analyzed, and the first font information is still transmitted to the font server 130 in step S390. Therefore, in step S430, the browser end 120 will still reload the first font information, and the browser end 120 will still process the "How are you" again, so it will still appear flashing on the screen. In order to solve the problem, if the first font information and the second font information are the same, the browser 120 still reloads the first font information, and the screen displays a flickering phenomenon. In the third embodiment, when the webpage designer edits the webpage, the name of the second font information is different from the name of the first font information, and the name of the second font information is still named as shown in FIG. 6A. It is "noto-2". When the step S390 is executed, the name "noto-2" of the second font information is changed to the name "noto-1" of the first font information, and then transmitted to the font server 130, and the related code is as shown in FIG. 6D. Shown. Since the font server 130 receives the name "noto-1" of the first font information, it will be treated as the first font information, so the second sub-set font file is created. The name of the second font information is still the name of the first font information "noto-1". However, in step S430, the name of the second font information in the second subset font file is changed back to the original name of the second font information, and the associated code is as shown in FIG. 6E. Since the name of the second font information has been changed back to the original name, only "What to eat today" is processed in step S430, "Why are you okay" there will be no relevant changes, so no flicker will occur. phenomenon. Moreover, in this way, after the webpage 30 is updated in real time, even if "How are you" and "What to eat today" have the same font type, there will be no word information and font information related to "How are you?" Repeated transfers and processing occur. The present invention has been described above, but it is not intended to limit the scope of patent rights claimed herein. The scope of patent protection is subject to the scope of the patent application and its equivalent fields. Any changes or modifications made by those skilled in the art without departing from the spirit or scope of this patent are subject to the equivalent changes or designs made in the spirit of the present disclosure and should be included in the scope of the patent application below. Inside.

2‧‧‧網際網路2‧‧‧Internet

30‧‧‧網頁30‧‧‧Webpage

100‧‧‧系統100‧‧‧ system

110‧‧‧網頁源110‧‧‧Web Source

112‧‧‧伺服主機112‧‧‧Servo host

120‧‧‧於網頁顯示字型的瀏覽裝置120‧‧‧Display device for displaying fonts on web pages

123‧‧‧主機123‧‧‧Host

124‧‧‧螢幕124‧‧‧ screen

130‧‧‧字型伺服器130‧‧‧ font server

132‧‧‧字型產生模組132‧‧‧ font generation module

134‧‧‧原始字型資料庫134‧‧‧ original font database

S110~S190、S210~S230、S380~S430‧‧‧流程圖步驟S110~S190, S210~S230, S380~S430‧‧‧ Flowchart steps

圖1所繪示為本發明之系統的實施例的示意圖。 圖2A與圖2B所繪示為本發明之於網頁顯示字型的方法的第一實施例的流程圖。 圖3A至圖3C所繪示為本發明之網頁的實施例與其變化。 圖4A至圖4E所繪示為網頁源、瀏覽器端、與字型伺服器間的資訊遞送關係的示意圖。 圖5A與圖5B所繪示為本發明之於網頁顯示字型的方法的第二實施例的流程圖。 圖6A~圖6E所繪示為本發明之瀏覽器端的網頁之程式碼的部分之相關實施例。 圖7A與圖7B所繪示為瀏覽器端與字型伺服器間的資訊遞送關係的示意圖。1 is a schematic diagram of an embodiment of a system of the present invention. 2A and 2B are flowcharts showing a first embodiment of a method for displaying a font on a webpage according to the present invention. 3A to 3C illustrate an embodiment of a web page of the present invention and variations thereof. 4A-4E are schematic diagrams showing information delivery relationships between a webpage source, a browser, and a font server. FIG. 5A and FIG. 5B are flowcharts showing a second embodiment of a method for displaying a font on a webpage according to the present invention. 6A-6E illustrate related embodiments of portions of the code of the web page of the browser of the present invention. 7A and 7B are schematic diagrams showing the information delivery relationship between the browser end and the font server.

Claims (12)

一種於網頁的內容變更時顯示字型的方法,包括: (a) 從對應到一網頁網址的一網頁源下載至少一網頁資訊到一瀏覽器端,該網頁資訊包括一連接資訊、至少一第一字碼資訊、與一第一字型資訊,該第一字碼資訊對應到該第一字型資訊; (b) 該瀏覽器端根據該連接資訊從一字型伺服器下載一字型顯示程式; (c) 該字型顯示程式至該字型伺服器下載一第一子集合字型檔案,且該瀏覽器端根據該第一子集合字型檔案顯示一網頁; (d) 於該瀏覽器端,更新該網頁的內容而產生至少一第二字碼資訊,該第二字碼資訊所對應到的字型圖像未出現在該第一子集合字型檔案中,且該第二字碼資訊是對應到一第二字型資訊; (e) 由該字型顯示程式重新分析全部的網頁資訊; (f) 該瀏覽器端將該網頁網址、該第一字碼資訊、該第二字碼資訊、該第一字型資訊、與該第二字型資訊傳送至該字型伺服器; (g) 該字型產生模組根據該網頁網址、該第一字碼資訊、該第二字碼資訊、該第一字型資訊、與該第二字型資訊產生至少一對應的第二子集合字型檔案; (h) 下載該第二子集合字型檔案至該瀏覽器端;以及 (i) 該瀏覽器端至少根據該第二子集合字型檔案將該第一字碼資訊、該第二字碼資訊、該第一字型資訊、與該第二字型資訊呈現於該網頁上。A method for displaying a font when a content of a webpage is changed includes: (a) downloading at least one webpage information from a webpage source corresponding to a webpage URL to a browser end, the webpage information including a connection information, at least one a word code information and a first font type information, the first word code information corresponding to the first font type information; (b) the browser terminal downloads a font display program from the font server according to the connection information; (c) the font display program downloads a first sub-set font file to the font server, and the browser displays a web page according to the first sub-set font file; (d) at the browser end And updating the content of the webpage to generate at least one second word code information, wherein the font image corresponding to the second word code information does not appear in the first subset font file, and the second word code information corresponds to a second type of information; (e) re-analysing all webpage information by the font display program; (f) the webpage of the webpage, the first wordcode information, the second wordcode information, the first Font information, and the second word The information is transmitted to the font server; (g) the font generation module generates the webpage based on the webpage address, the first character code information, the second word information, the first font information, and the second font information At least one corresponding second subset font file; (h) downloading the second subset font file to the browser; and (i) the browser terminal at least according to the second subset font file The first word code information, the second word code information, the first font information, and the second font information are presented on the web page. 如申請專利範圍第1項之於網頁的內容變更時顯示字型的方法,其中於(d)步驟中,是藉由該瀏覽器端的應用程式或嵌入在該瀏覽器端的Javascript來更新該網頁資訊。The method for displaying a font when the content of the webpage is changed according to the first item of the patent application, wherein in the step (d), the webpage information is updated by the browser application or the Javascript embedded in the browser. . 如申請專利範圍第1項之於網頁的內容變更時顯示字型的方法,其中於(d)步驟中,是藉由CSS語言來將該第二字碼資訊是對應到該第二字型資訊。The method for displaying a font when the content of the webpage is changed according to the first item of the patent application, wherein in the step (d), the second word information is corresponding to the second font information by the CSS language. 如申請專利範圍第1項之於網頁的內容變更時顯示字型的方法,其中於(d)步驟中,該第二字型資訊是相同於該第一字型資訊,於(h)步驟中該第二子集合字型檔案將覆蓋該第一子集合字型檔案。The method for displaying a font when the content of the webpage is changed according to the first item of the patent application, wherein in the step (d), the second font information is the same as the first font information, in step (h) The second subset font file will overwrite the first subset font file. 一種於網頁的內容變更時顯示字型的方法,包括: (a) 從對應到一網頁網址的一網頁源下載至少一網頁資訊到一瀏覽器端,該網頁資訊包括一連接資訊、至少一第一字碼資訊、與一第一字型資訊,該第一字碼資訊對應到該第一字型資訊; (b) 該瀏覽器端根據該連接資訊從一字型伺服器下載一字型顯示程式; (c) 該字型顯示程式至該字型伺服器下載一第一子集合字型檔案,且該瀏覽器端根據該第一子集合字型檔案顯示一網頁; (d) 於該瀏覽器端,更新該網頁的內容而產生至少一第二字碼資訊,該第二字碼資訊所對應到的字型圖像未出現在該第一子集合字型檔案中,且該第二字碼資訊是對應到一第二字型資訊; (e) 由該字型顯示程式分析該網頁資訊中的該第二字碼資訊或該第二字型資訊; (f) 該瀏覽器端將該網頁網址、該第二字碼資訊、與該第二字型資訊傳送至該字型伺服器; (g) 該字型產生模組根據該網頁網址、該第二字碼資訊與該第二字型資訊產生至少一對應的第二子集合字型檔案; (h) 下載該第二子集合字型檔案至該瀏覽器端;以及 (i) 該瀏覽器端根據該第二子集合字型檔案將該第二字碼資訊與該第二字型資訊呈現於該網頁上。A method for displaying a font when a content of a webpage is changed includes: (a) downloading at least one webpage information from a webpage source corresponding to a webpage URL to a browser end, the webpage information including a connection information, at least one a word code information and a first font type information, the first word code information corresponding to the first font type information; (b) the browser terminal downloads a font display program from the font server according to the connection information; (c) the font display program downloads a first sub-set font file to the font server, and the browser displays a web page according to the first sub-set font file; (d) at the browser end And updating the content of the webpage to generate at least one second word code information, wherein the font image corresponding to the second word code information does not appear in the first subset font file, and the second word code information corresponds to a second type of information; (e) analyzing the second word information or the second type of information in the webpage information by the font display program; (f) the webpage of the webpage, the second Code information and the second type of information Sending to the font server; (g) the font generation module generates at least one corresponding second subset font file according to the webpage web address, the second character code information and the second font information; (h) Downloading the second sub-set font file to the browser; and (i) the browser displaying the second word information and the second font information on the webpage according to the second sub-set font file . 如申請專利範圍第5項之於網頁的內容變更時顯示字型的方法,其中於(d)步驟中,是將該第二字碼資訊對應到一元素,而於(e)步驟中是藉由分析該元素以分析該第二字碼資訊。The method for displaying a font when the content of the webpage is changed according to item 5 of the patent application scope, wherein in the step (d), the second word code information is mapped to an element, and in the step (e), The element is analyzed to analyze the second word information. 如申請專利範圍第5項之於網頁的內容變更時顯示字型的方法,其中於(d)步驟中,是將該第二字碼資訊對應到一元素,該元素對應到該第二字型資訊,而於(e)步驟中是藉由分析該第二字型資訊以分析該第二字碼資訊。The method for displaying a font when the content of the webpage is changed according to item 5 of the patent application scope, wherein in the step (d), the second word code information is corresponding to an element corresponding to the second font information. And in step (e), analyzing the second font information by analyzing the second font information. 如申請專利範圍第5項之於網頁的內容變更時顯示字型的方法,其中於(d)步驟中,若該第二字型資訊是相同於該第一字型資訊,但於該瀏覽器端,該第二字型資訊的名稱不同於該第一字型資訊的名稱;於(f)步驟中,該第二字型資訊的名稱是改成該第一字型資訊的名稱後傳送至該字型伺服器;且於(h)步驟與(i)步驟中,該第二子集合字型檔案中該第二字型資訊的名稱被改回該第二字型資訊原有的名稱。The method for displaying a font when the content of the webpage is changed according to the fifth item of the patent application, wherein in the step (d), if the second font information is the same as the first font information, but in the browser End, the name of the second font information is different from the name of the first font information; in step (f), the name of the second font information is changed to the name of the first font information and then transmitted to The font server; and in steps (h) and (i), the name of the second font information in the second subset font file is changed back to the original name of the second font information. 如申請專利範圍第5項之於網頁的內容變更時顯示字型的方法,其中於(d)步驟中,是藉由該瀏覽器端的應用程式或嵌入在該瀏覽器端的Javascript來更新該網頁資訊。The method for displaying a font when the content of the webpage is changed according to the fifth aspect of the patent application, wherein in the step (d), the webpage information is updated by the browser-side application or the Javascript embedded in the browser. . 如申請專利範圍第5項之於網頁的內容變更時顯示字型的方法,其中於(d)步驟中,是藉由CSS語言來將該第二字碼資訊是對應到該第二字型資訊。The method for displaying a font when the content of the webpage is changed according to the fifth item of the patent application, wherein in the step (d), the second character code information is corresponding to the second font information by using the CSS language. 如申請專利範圍第5項之於網頁的內容變更時顯示字型的方法,其中於(d)步驟中,該第二字型資訊相同於該第一字型資訊,則(e)步驟中字型顯示程式也將分析該第一字碼資訊,於(f)步驟中該瀏覽器端也將傳送該第一字碼資訊至該字型伺服器,於(h)步驟中該第二子集合字型檔案效果將覆蓋該第一子集合字型檔案。The method for displaying a font when the content of the webpage is changed according to item 5 of the patent application scope, wherein in the step (d), the second font type information is the same as the first font type information, and the font type in the step (e) The display program will also analyze the first word code information. In step (f), the browser terminal will also transmit the first word code information to the font server, and in the (h) step, the second sub-set font file. The effect will overwrite the first subset of font files. 如申請專利範圍第1項至第11項中任一項之於網頁顯示字型的方法,其中該瀏覽器端為裝設有瀏覽器軟體的一智慧型手機、一平板電腦、一桌上型電腦、或一筆記型電腦。The method for displaying a font on a webpage according to any one of the items 1 to 11 of the patent application, wherein the browser end is a smart phone, a tablet computer, and a desktop type equipped with a browser software. Computer, or a laptop.
TW106110725A 2017-03-30 2017-03-30 Method of displaying font when changing the content of web page TW201837738A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
TW106110725A TW201837738A (en) 2017-03-30 2017-03-30 Method of displaying font when changing the content of web page
CN201710301857.0A CN108664537A (en) 2017-03-30 2017-05-02 Method for displaying font when changing content of webpage

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW106110725A TW201837738A (en) 2017-03-30 2017-03-30 Method of displaying font when changing the content of web page

Publications (1)

Publication Number Publication Date
TW201837738A true TW201837738A (en) 2018-10-16

Family

ID=63784574

Family Applications (1)

Application Number Title Priority Date Filing Date
TW106110725A TW201837738A (en) 2017-03-30 2017-03-30 Method of displaying font when changing the content of web page

Country Status (2)

Country Link
CN (1) CN108664537A (en)
TW (1) TW201837738A (en)

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100478397B1 (en) * 2004-11-24 2005-03-24 엔에이치엔(주) Method for providing font service on service page and system for executing the method
CN102467515A (en) * 2010-10-28 2012-05-23 亚太戏网股份有限公司 System for generating webpage totem through totem server
CN103136281A (en) * 2011-12-05 2013-06-05 英顺源(上海)科技有限公司 Web search result display system and method thereof
CN103761110B (en) * 2014-02-18 2017-12-26 优视科技有限公司 browser font display processing method and device
CN105022757A (en) * 2014-04-29 2015-11-04 腾讯科技(深圳)有限公司 Webpage revision method and webpage revision device
US10614249B2 (en) * 2015-07-01 2020-04-07 Allscripts Software, Llc Sanitization of content displayed by web-based applications
CN105512318B (en) * 2015-12-16 2019-11-08 山石网科通信技术股份有限公司 Page generation method and device
TWI571751B (en) * 2016-05-17 2017-02-21 亞太戲網股份有限公司 Acceleration method for showing asian language fonts in pages, font server, and browsing end

Also Published As

Publication number Publication date
CN108664537A (en) 2018-10-16

Similar Documents

Publication Publication Date Title
US10949491B2 (en) Method and apparatus for using proxies to interact with webpage analytics
US10469561B2 (en) System and method for managing multiple variants of an HTTP object
US10185704B2 (en) Webpage browsing method, webapp framework, method and device for executing javascript and mobile terminal
US10924574B2 (en) Systems and methods for managing loading priority or sequencing of fragments of a web object
US8122104B2 (en) Method and system for providing XML-based asynchronous and interactive feeds for web applications
JP6416374B2 (en) Fast rendering of websites containing dynamic content and old content
US9147004B2 (en) Website builder systems and methods with device detection to adapt rendering behavior based on device type
EP3518124A1 (en) Webpage rendering method and related device
US11790158B1 (en) System and method for using a dynamic webpage editor
US9864671B1 (en) Systems and methods of live experimentation on content provided by a web site
US20140101539A1 (en) Website presenting method and browser
US20100223322A1 (en) Server based framework for improving ajax performance
US20090112824A1 (en) Method and apparatus for generating presentation configuration file of document content
US20130174015A1 (en) Dynamically modifiable mobile device simulator
US20090144640A1 (en) Distributed hosting of web application styles
CN106339414A (en) Webpage rendering method and device
IL224401A (en) Visual designation of a zone in rendered code
CN103092941A (en) Method and device showing content on electronic equipment
US20200027136A1 (en) Visual designation of a zone in rendered code
CN106936727A (en) A kind of Webpage display process and device
TW201837738A (en) Method of displaying font when changing the content of web page
TWI571751B (en) Acceleration method for showing asian language fonts in pages, font server, and browsing end
US20090144613A1 (en) Overriding images in user interfaces
JP4921570B2 (en) Blog service providing system, method and program
US8291311B2 (en) Web display program conversion system, web display program conversion method and program for converting web display program