Word size adjustment method and device, electronic equipment and storage medium
By adjusting the font size of only the first visible sub-page and applying it to subsequent sub-pages, the method improves efficiency and reduces resource overhead in font size adjustments for information streams with multiple sub-pages.
Patent Information
- Application Number
- CN202411096203.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-09
- Publication Date
- 2024-12-03
AI Technical Summary
Existing technologies face inefficiencies in adjusting font sizes within information streams containing multiple sub-pages, leading to excessive computer resource overhead during font size previews.
Adjust the font size of only the first sub-page visible to the user, and upon confirmation, apply the same font size to subsequent sub-pages outside the visible area, minimizing redundant rendering and resource usage.
This approach reduces computer resource overhead and enhances the efficiency of font size adjustments by optimizing the process for information streams with multiple sub-pages.
Smart Images

Figure CN119065560A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a font size adjustment method, device, electronic device and storage medium. Background Art
[0002] Information flow refers to streaming information that is continuously updated and presents content to users. A typical example of an information flow is a FEED flow. Usually, an information flow contains multiple sub-pages, and users can browse the contents of each sub-page by sliding in the order of the sub-pages. Considering that users have the need to adjust the font size of the content they browse, how to improve the efficiency of font size adjustment in the information flow scenario has become one of the problems that need to be solved urgently. Summary of the invention
[0003] The embodiments of the present disclosure provide a font size adjustment method, device, electronic device and storage medium, which can improve the efficiency of adjusting the font size of an information stream in a scenario where the information stream includes multiple sub-pages.
[0004] In a first aspect, an embodiment of the present disclosure provides a font size adjustment method, comprising:
[0005] Displaying at least one first sub-page in the first information stream in the user-visible area;
[0006] In response to the font size adjustment preview operation for the first information stream, adjusting the font size of the first subpage according to the first font size information to be previewed, and displaying the first subpage after the font size adjustment in the user visible area;
[0007] In response to a font size adjustment determination operation for the first font size information, the first sub-page after the font size adjustment is continuously displayed, and the font size of the second sub-page is adjusted according to the first font size information; the second sub-page is a sub-page in the first information flow other than the first sub-page; the second sub-page after the font size adjustment is displayed when it is located in the user visible area.
[0008] In a second aspect, an embodiment of the present disclosure provides a font size adjustment device, including:
[0009] A page display unit, configured to display at least one first sub-page in the first information stream in a user-visible area;
[0010] A first adjustment unit is configured to, in response to a font size adjustment preview operation for the first information stream, adjust the font size of the first sub-page according to the first font size information to be previewed, and display the first sub-page after the font size adjustment in the user visible area;
[0011] A second adjustment unit is used to respond to a font size adjustment determination operation for the first font size information, continuously display the first sub-page after the font size adjustment, and adjust the font size of the second sub-page according to the first font size information; the second sub-page is a sub-page in the first information flow other than the first sub-page; the second sub-page after the font size adjustment is displayed when it is located in the user visible area.
[0012] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising: a processor; and a memory configured to store computer-executable instructions, wherein the computer-executable instructions, when executed, enable the processor to implement the steps of the method described in the first aspect above.
[0013] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store computer-executable instructions, and the computer-executable instructions implement the steps of the method described in the first aspect when executed by a processor.
[0014] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.
[0015] In one or more embodiments of the present disclosure, first, at least one first sub-page in the first information stream is displayed in the user-visible area, then, in response to the font size adjustment preview operation for the first information stream, the font size of the first sub-page is adjusted according to the first font size information to be previewed, and the first sub-page after the font size adjustment is displayed in the user-visible area, and finally, in response to the font size adjustment confirmation operation for the first font size information, the first sub-page after the font size adjustment is continuously displayed, and the font size of the second sub-page is adjusted according to the first font size information, the second sub-page is a sub-page in the first information stream other than the first sub-page, and the second sub-page after the font size adjustment is displayed when it is located in the user-visible area. It can be seen that through this embodiment, in the scenario where the first information stream includes multiple sub-pages, when previewing the font size, it is only necessary to adjust the font size information of the first sub-page in the user-visible area, and it is not necessary to adjust the font size information of the second sub-page outside the user-visible area. After confirming the preview effect, the font size information of the second sub-page outside the user-visible area is adjusted, thereby saving the computer resource overhead caused by the font size adjustment during the font size preview, and improving the efficiency of the font size adjustment of the first information stream. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate one or more embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present disclosure. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative labor.
[0017] Figure 1 A flowchart of a font size adjustment method provided by an embodiment of the present disclosure;
[0018] Figure 2a A schematic diagram of a first information flow provided by an embodiment of the present disclosure;
[0019] Figure 2b A schematic diagram of a font size adjustment panel provided in an embodiment of the present disclosure;
[0020] Figure 2c A schematic diagram of a first subpage after the font size is adjusted according to an embodiment of the present disclosure;
[0021] Figure 3a A schematic diagram of a target subpage before font size adjustment provided by an embodiment of the present disclosure;
[0022] Figure 3b A schematic diagram of a target subpage after font size adjustment provided by an embodiment of the present disclosure;
[0023] Figure 4a A schematic diagram of a target subpage before font size adjustment provided by another embodiment of the present disclosure;
[0024] Figure 4b A schematic diagram of a target subpage after font size adjustment provided by another embodiment of the present disclosure;
[0025] Figure 5a A schematic diagram of a target subpage before font size adjustment provided by another embodiment of the present disclosure;
[0026] Figure 5b A schematic diagram of a target subpage after font size adjustment provided by another embodiment of the present disclosure;
[0027] Figure 6 A schematic diagram of the structure of a font size adjustment device provided in one embodiment of the present disclosure;
[0028] Figure 7 A schematic diagram of the structure of an electronic device provided in one embodiment of the present disclosure. DETAILED DESCRIPTION
[0029] In order to enable those skilled in the art to better understand the technical solutions in one or more embodiments of the present disclosure, the technical solutions in one or more embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in one or more embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on one or more embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the protection scope of the present disclosure.
[0030] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0031] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0032] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0033] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0034] The disclosed embodiment provides a font size adjustment method, which can improve the efficiency of adjusting the font size of an information stream when the information stream includes multiple sub-pages. The font size adjustment method can be applied to and executed by a terminal device, which includes but is not limited to electronic devices such as mobile phones, computers, tablet computers, laptops, car computers, and wearable devices.
[0035] Figure 1 A flowchart of a font size adjustment method provided by an embodiment of the present disclosure is shown in FIG. Figure 1 As shown, the process includes:
[0036] Step S102, displaying at least one first sub-page in the first information flow in the user visible area;
[0037] Step S104, in response to the font size adjustment preview operation for the first information stream, adjusting the font size of the first sub-page according to the first font size information to be previewed, and displaying the first sub-page after the font size adjustment in the user visible area;
[0038] Step S106, in response to the font size adjustment determination operation for the first font size information, continuously display the first sub-page after the font size adjustment, and adjust the font size of the second sub-page according to the first font size information; the second sub-page is a sub-page in the first information flow other than the first sub-page; the second sub-page after the font size adjustment is displayed when it is located in the user visible area.
[0039] In this embodiment, first, at least one first sub-page in the first information stream is displayed in the user-visible area, then, in response to the font size adjustment preview operation for the first information stream, the font size of the first sub-page is adjusted according to the first font size information to be previewed, and the first sub-page with the adjusted font size is displayed in the user-visible area, and finally, in response to the font size adjustment confirmation operation for the first font size information, the first sub-page with the adjusted font size is continuously displayed, and the font size of the second sub-page is adjusted according to the first font size information, the second sub-page is a sub-page in the first information stream other than the first sub-page, and the second sub-page with the adjusted font size is displayed when it is located in the user-visible area. It can be seen that through this embodiment, in the scenario where the first information stream includes multiple sub-pages, when previewing the font size, it is only necessary to adjust the font size information of the first sub-page in the user-visible area, and it is not necessary to adjust the font size information of the second sub-page outside the user-visible area. After confirming the preview effect, the font size information of the second sub-page outside the user-visible area is adjusted, thereby saving the computer resource overhead caused by the font size adjustment during the font size preview, and improving the efficiency of the font size adjustment of the first information stream.
[0040] In the above step S102, at least one first sub-page in the first information stream is displayed in the user-visible area. In this embodiment, the user-visible area refers to the visible area of the user on the screen of the terminal device. Usually, the user-visible area is the entire screen of the terminal device. The first information stream can be any streaming information that is continuously updated and presents content to the user. In one example, a reading application is running in the terminal device, and the first information stream is an information stream in the reading application for displaying various stories. The various stories can be provided by the contracted authors of the reading application or by the users of the reading application. In another example, a social application is running in the terminal device, and the first information stream is an information stream in the social application for displaying various articles. The various articles can be provided by the users of the social application.
[0041] The first information stream includes multiple sub-pages. In the above example, each sub-page is used to display a story or an article. In one embodiment, each sub-page includes a page card and the content in the page card. The page card is equivalent to a container for the sub-page, and the content in the page card is the content of the sub-page, which can be the above-mentioned story or article. Therefore, when the user browses each sub-page in the first information stream in the order of arrangement of each sub-page by sliding, the terminal device needs to render and display each page card and the content in each page card in sequence.
[0042] In this embodiment, one or more sub-pages in the first information stream displayed in the user-visible area are determined as first sub-pages, so that at least one first sub-page in the first information stream is displayed in the user-visible area.
[0043] In the above step S102, the font size adjustment preview operation of the user for the first information stream is obtained. Figure 2a A schematic diagram of a first information flow provided by an embodiment of the present disclosure, such as Figure 2a As shown, taking the screen of the terminal device as the user visible area as an example, two first sub-pages in the first information flow are displayed in the user visible area. Figure 2a As shown, in one example, each first sub-page is used to display an ancient poem. The user can perform a font size adjustment panel call-up operation on the first information stream, thereby displaying the font size adjustment panel. Figure 2b A schematic diagram of a font size adjustment panel provided in an embodiment of the present disclosure is shown in FIG. Figure 2b As shown, in response to the user's font size adjustment panel call-up operation for the first information stream, the terminal device displays a font size adjustment panel, which displays various font sizes available for selection. The user can select the font size to be previewed by dragging the slider. In one example, the user clicks Figure 2a The "Font Size" entry shown in the figure calls up the font size adjustment panel. Of course, the user can also call up the font size adjustment panel in other ways, which will not be repeated here.
[0044] In this embodiment, the font size adjustment panel waking operation performed by the user and the operation of selecting the font size to be previewed in the font size adjustment panel are taken together as the font size adjustment preview operation. Thus, the terminal device determines the first font size information to be previewed selected by the user according to the font size adjustment preview operation of the user on the first information stream, for example, determining the first font size information to be Figure 2b The terminal device adjusts the font size of the first sub-page according to the first font size information, and displays the first sub-page after the font size adjustment in the user visible area. Figure 2b As shown, the terminal device adjusts the font size of the first sub-page according to the first font size information "4", and displays the first sub-page after the font size adjustment in the user visible area. Figure 2bIn the example of , the user chooses to increase the font size of the first information stream.
[0045] Next, in the above step S106, the user's font size adjustment determination operation for the first font size information is obtained, such as Figure 2b As shown, the font size adjustment determination operation may be an operation of the user clicking to close the font size adjustment panel. In response to the user's font size adjustment determination operation for the first font size information, the terminal device continues to display the first sub-page after the font size is adjusted. Figure 2c A schematic diagram of a first sub-page after the font size is adjusted according to an embodiment of the present disclosure is shown in FIG. Figure 2c As shown, in response to the user's font size adjustment confirmation operation for the first font size information, the terminal device cancels display of the font size adjustment panel and continues to display the first sub-page after the font size is adjusted.
[0046] Also, in this embodiment, the font size of the second sub-page is adjusted according to the first font size information determined by the user, and the second sub-page is a sub-page in the first information flow except the first sub-page, that is, the second sub-page is a sub-page outside the user-visible area, and the second sub-page after the font size adjustment is displayed when it is located in the user-visible area by user sliding or other means.
[0047] In one example, each sub-page in the first information flow includes a text area and a non-text area. The text area is used to display the text content of the sub-page, and the non-text area can be used to display content such as article titles and user comments. Figure 1 According to the process in FIG. 1 , the user can adjust the font size of the main text area of the first information stream. Therefore, the above-mentioned font size adjustment preview operation and font size adjustment confirmation operation are both operations for the main text area of the first information stream.
[0048] It can be seen that through this embodiment, in the scenario where the first information stream includes multiple sub-pages, when previewing the font size, it is only necessary to adjust the font size information of the first sub-page in the user-visible area, and there is no need to adjust the font size information of the second sub-page outside the user-visible area. After confirming the preview effect, the font size information of the second sub-page outside the user-visible area is adjusted, thereby saving computer resource overhead caused by font size adjustment during font size preview and improving the efficiency of font size adjustment for the first information stream.
[0049] In one embodiment, the above-mentioned font size adjustment of the first sub-page according to the first font size information to be previewed includes: modifying the font size information of the first sub-page to the first font size information, and re-rendering the first sub-page according to the modified font size information. In this embodiment, after determining the first font size information to be previewed by the user, if the first font size information is different from the font size information currently displayed on the first sub-page, the font size information of the first sub-page is modified to the first font size information, and the first sub-page is re-rendered according to the modified font size information, thereby achieving the effect of adjusting the font size of the first sub-page according to the first font size information. Among them, the font size information currently displayed on the first sub-page can be the font size information currently displayed on the first information flow. It can be understood that after the first sub-page is re-rendered, the rendered first sub-page can be displayed, and displaying the rendered first sub-page is to display the first sub-page after the font size is adjusted.
[0050] In one embodiment, the above-mentioned adjustment of the font size of the second sub-page according to the first font size information includes: modifying the font size information of the second sub-page to the first font size information, and re-rendering the second sub-page according to the modified font size information. In this embodiment, after the user confirms the first font size information, if the first font size information is different from the current font size information of the second sub-page, the font size information of the second sub-page is modified to the first font size information, and the second sub-page is re-rendered according to the modified font size information, thereby achieving the effect of adjusting the font size of the second sub-page according to the first font size information. Among them, the current font size information of the second sub-page can be the font size information currently displayed in the first information flow.
[0051] It can be seen that in this embodiment, when the user previews the first font size information, only the first sub-page is rendered, and when the user confirms the first font size information, the second sub-page is rendered, thereby saving the computer resource overhead caused by page rendering during font size preview and improving the efficiency of font size adjustment for the first information stream.
[0052] In one embodiment, displaying the first sub-page with the font size adjusted in the user visible area includes:
[0053] Determine a display position of the first subpage in the user visible area after the font size is adjusted; the display position of the first subpage in the user visible area after the font size is adjusted matches the display position of the first subpage in the user visible area before the font size is adjusted;
[0054] The first sub-page with the adjusted font size is displayed according to the display position of the first sub-page with the adjusted font size in the user visible area.
[0055] In this embodiment, the display position of the first sub-page in the user visible area after the font size is adjusted is first determined. In order to facilitate the user to continue reading the content of the first sub-page, in this embodiment, the display position of the first sub-page in the user visible area after the font size is adjusted is configured to match the display position of the first sub-page in the user visible area before the font size is adjusted. Specifically, it can be expressed as follows: the display position of the content in the first sub-page in the user visible area after the font size is adjusted is basically consistent with the display position of the content in the first sub-page in the user visible area before the font size is adjusted, so that the user can continue to read the content of the first sub-page after the font size is adjusted. Then, according to the display position of the first sub-page in the user visible area after the font size is adjusted, the first sub-page with the adjusted font size is displayed.
[0056] It can be seen that through this embodiment, the display position of the first sub-page after the font size is adjusted in the user visible area can be configured to match the display position of the first sub-page before the font size is adjusted in the user visible area, and the first sub-page after the font size is adjusted is displayed according to the display position of the first sub-page after the font size is adjusted in the user visible area, thereby facilitating the user to continue reading the content of the first sub-page after the font size is adjusted, improving the user's reading experience, and avoiding the situation where the content being read before the font size adjustment is out of the user visible area due to the font size adjustment operation.
[0057] In one embodiment, determining the display position of the first sub-page after the font size is adjusted in the user visible area includes:
[0058] Determine a target subpage and a non-target subpage in each first subpage; the target subpage is the first subpage with the largest area in the user visible area in each first subpage; the non-target subpage is the first subpage other than the target subpage in each first subpage;
[0059] Determine the first display position of the target subpage after the font size is adjusted in the user visible area;
[0060] According to the first display position, a second display position of the non-target sub-page with the font size adjusted in the user visible area is determined.
[0061] In this embodiment, one or more first sub-pages of the first information flow are displayed in the user-visible area. First, the target sub-page and the non-target sub-page are determined in each first sub-page. When a first sub-page is displayed in the user-visible area, the first sub-page is the target sub-page. When multiple first sub-pages are displayed in the user-visible area, the first sub-page with the largest area in the user-visible area is the target sub-page, and the first sub-pages other than the target sub-page are non-target sub-pages. Figure 2a As shown, Figure 2a The first subpage a in is the target subpage. Figure 2a The first sub-page b in is the non-target sub-page.
[0062] Then, the first display position of the target sub-page in the user visible area after the font size is adjusted is determined, and the first display position of the target sub-page in the user visible area after the font size is adjusted matches the display position of the target sub-page in the user visible area before the font size is adjusted, that is, the first display position of the content in the target sub-page in the user visible area after the font size is adjusted is basically consistent with the display position of the content in the target sub-page in the user visible area before the font size is adjusted, thereby facilitating the user to continue browsing the content in the target sub-page after the font size is adjusted.
[0063] Finally, the second display position of the non-target sub-page after the font size adjustment in the user visible area is determined according to the first display position. After the font size is adjusted in the first information stream, the size of each sub-page will be changed, such as changing the height of each sub-page, but the spacing between each sub-page will not change. Therefore, after the first display position of the target sub-page after the font size adjustment is determined, the second display position of the non-target sub-page after the font size adjustment in the user visible area can be determined according to the first display position and the preset spacing between each sub-page in the first information stream.
[0064] It can be seen that through this embodiment, the target subpage and the non-target subpage can be determined in each first subpage, and the first display position of the target subpage after the font size is adjusted in the user visible area can be determined, and the second display position of the non-target subpage after the font size is adjusted in the user visible area can be determined according to the first display position. Since the target subpage is the first subpage with the largest area in the user visible area among each first subpage, the target subpage is most likely the subpage that the user is currently paying attention to. By preferentially determining the first display position of the first subpage, and then determining the second display position of the non-target subpage according to the first display position, the display position of the subpage that the user is paying attention to before and after the font size is adjusted can be prevented from changing significantly with the font size change, thereby improving the user's reading experience of the first information flow.
[0065] In one embodiment, the target subpage includes a target text area; the target text area is entirely located in a user visible area before the font size is adjusted; and determining a first display position of the target subpage in the user visible area after the font size is adjusted includes:
[0066] Determine the top edge of the target subpage as the first top edge, and determine the top edge of the first information flow as the second top edge;
[0067] Get a first distance value between the first top edge and the second top edge after the font size is adjusted, and get a second distance value between the first top edge and a specified position in the user visible area before the font size is adjusted;
[0068] A first display position is determined according to the first distance value and the second distance value.
[0069] In this embodiment, each subpage in the first information flow includes a text area and a non-text area. The text area is used to display the text content of the subpage, and the non-text area can be used to display the article title, user comments, etc. Based on this, the text area in the target subpage is the target text area, and the non-text area in the target subpage is the non-target text area. Figure 3a A schematic diagram of a target subpage before font size adjustment provided by an embodiment of the present disclosure, Figure 3a For example, the target subpage includes a target text area and a non-target text area such as a title area. Moreover, before the font size of the first information flow is adjusted, the target text area of the target subpage is all located in the user visible area.
[0070] In this embodiment, the top edge of the target subpage is determined to be the first top edge, wherein the top edge of the target subpage refers to the top edge of the target subpage. Figure 3a As shown, in one case, all the target subpages are located in the user-visible area before the font size is adjusted, so the top edge of the target subpage before the font size is adjusted, that is, the first top edge, is located in the user-visible area. In this actual example, the top edge of the first information stream is also determined to be the second top edge, wherein the top edge of the first information stream refers to the top edge of the first information stream, and the top edge of the first information stream can be the top edge of the first subpage in the first information stream, or a top edge located above the top edge of the first subpage.
[0071] In this embodiment, the first distance value between the first top edge and the second top edge after the font size is adjusted is obtained. After the font size of the first information stream is adjusted, the position of the second top edge will not change. However, as the font size changes, the height of each sub-page in the first information stream may change, so that the distance value between the first top edge and the second top edge changes, and the first distance value between the first top edge and the second top edge after the font size is adjusted is obtained. In one example, the user adjusts the font size of the main text area of the first information stream. When the main text size of the first information stream increases, the height of the main text area of each sub-page in the first information stream increases, causing the distance value between the first top edge and the second top edge to also increase, and the first distance value between the first top edge and the second top edge after the font size is adjusted is obtained.
[0072] In this embodiment, a designated position is also determined in the user visible area. For example, the top edge of the user visible area is determined as the designated position, or a predetermined position in the user visible area is determined as the designated position. In one example, the designated position is the position where the user's line of sight is located in the user visible area. In this embodiment, a second distance value between the first top edge before the font size is adjusted and the designated position in the user visible area is also obtained, for example, a second distance value between the first top edge before the font size is adjusted and the top edge of the user visible area is obtained. In this embodiment, the first display position can be determined based on the first distance value and the second distance value.
[0073] It can be seen that through this embodiment, when the target text area of the target sub-page before the font size is adjusted is entirely located in the user-visible area, the top edge of the target sub-page can be determined as the first top edge, the top edge of the first information flow can be determined as the second top edge, the first distance value between the first top edge and the second top edge after the font size is adjusted is obtained, the second distance value between the first top edge and the specified position in the user-visible area before the font size is adjusted is obtained, and the first display position of the target sub-page after the font size is adjusted in the user-visible area is accurately determined based on the first distance value and the second distance value.
[0074] In one embodiment, determining the first display position according to the first distance value and the second distance value includes:
[0075] determining a first offset value according to the first distance value and the second distance value;
[0076] Determine a first position obtained by offsetting the first offset value within the first information flow starting from the second top edge; the first position is located in the target subpage;
[0077] When the designated position is aligned with the first position, the display position of the target sub-page after the font size is adjusted in the user visible area is determined as the first display position.
[0078] In this embodiment, the first offset value is determined based on the first distance value and the second distance value, and the first position obtained by offsetting the first offset value from the second top edge within the first information stream is determined. The first position is located in the target subpage. After the font size of the first information stream is adjusted, as described above, the height of each subpage in the first information stream may change. Here, firstly, according to the font size adjustment preview operation, the height of each subpage after the font size adjustment is determined. Then, according to the height of each subpage after the font size adjustment, the first offset value is offset from the second top edge within the first information stream. The position obtained after the offset is the first position, and the first position is located in the target subpage.
[0079] In this embodiment, the designated position in the user visible area is aligned with the first position obtained by the offset. When the designated position is aligned with the first position, the display position of the target subpage in the user visible area after the font size is adjusted is the first display position.
[0080] It can be seen that through this embodiment, since the designated position is the position that the user is concerned about, and the first position is the position determined based on the above-mentioned first distance value and the second distance value, therefore, after aligning the designated position with the first position obtained by the offset, the content of the target sub-page can be displayed at the position that the user is concerned about, ensuring that the display position of the target sub-page in the user visible area after the font size adjustment matches the display position of the target sub-page in the user visible area before the font size adjustment, so that the user can continue to read the content of the target sub-page after the font size adjustment, thereby improving the user's reading experience and avoiding the situation where the content being read before the font size adjustment is out of the user's visible area due to the font size adjustment operation.
[0081] In one embodiment, before the font size is adjusted, the first top edge is located in the user visible area; and determining the first offset value according to the first distance value and the second distance value includes:
[0082] A difference between the first distance value and the second distance value is determined, and the difference is used as a first offset value.
[0083] by Figure 3a For example, before the font size is adjusted, the target subpage is completely located in the user visible area, so the top edge of the target subpage before the font size is adjusted, that is, the first top edge, is located in the user visible area, and the target text area of the target subpage before the font size is adjusted is completely located in the user visible area. In this case, the first distance value and the second distance value are obtained. The second distance value can refer to Figure 3a , which is the distance value between the top edge of the user visible area and the top edge of the target subpage before the font size is adjusted. The first distance value is not shown in the figure.
[0084] Next, the first distance value must be greater than the second distance value, and the first offset distance is obtained by subtracting the second distance value from the first distance value. According to the font size adjustment preview operation, the height of each sub-page after the font size is adjusted is determined, and according to the height of each sub-page after the font size is adjusted, the first offset value is offset from the second top edge within the first information flow, and the position obtained after the offset is the first position, which is located in the target sub-page. Align the specified position in the user-visible area with the first position obtained by the offset. When the specified position is aligned with the first position, the display position of the target sub-page after the font size is adjusted in the user-visible area is the first display position.
[0085] Figure 3b A schematic diagram of a target subpage after font size adjustment provided by an embodiment of the present disclosure, such as Figure 3a and Figure 3b As shown, when the target text area of the target sub-page is entirely located in the user-visible area before the font size is adjusted and the top edge of the target sub-page, that is, the first top edge, is located in the user-visible area before the font size is adjusted, the above process can calculate the first offset value, determine the first display position based on the first offset value, and display the target sub-page and non-target sub-page based on the first display position, so that the display position of the target sub-page that the user is paying attention to before and after the font size adjustment does not change significantly with the font size change in the user-visible area, so that the user can read the content of the target sub-page smoothly before and after the font size adjustment.
[0086] It can be seen that through this embodiment, when the target text area is entirely located in the user-visible area before the font size is adjusted and the first top edge is located in the user-visible area before the font size is adjusted, the difference between the first distance value and the second distance value can be determined, and the difference is used as the first offset value, and then the first display position is determined according to the first offset value, and the target sub-page and non-target sub-page are displayed based on the first display position, so that the display position of the target sub-page that the user is concerned about before and after the font size adjustment does not change significantly with the font size change in the user-visible area, so that the user can read the content of the target sub-page smoothly before and after the font size adjustment.
[0087] In one embodiment, before the font size is adjusted, the first top edge is outside the user visible area; and determining the first offset value according to the first distance value and the second distance value includes:
[0088] A first sum value between the first distance value and the second distance value is determined, and the first sum value is used as a first offset value.
[0089] Figure 4a A schematic diagram of a target subpage before font size adjustment provided by another embodiment of the present disclosure, Figure 4a For example, before the font size is adjusted, the top edge of the target subpage, that is, the first top edge, is located outside the user visible area, and before the font size is adjusted, the target text area of the target subpage is entirely located in the user visible area. In this case, the first distance value and the second distance value are obtained. The second distance value can refer to Figure 4a , which is the distance value between the top edge of the user visible area and the top edge of the target subpage before the font size is adjusted. The first distance value is not shown in the figure.
[0090] Next, the first offset distance is obtained by adding the first distance value to the second distance value. According to the font size adjustment preview operation, the height of each sub-page after the font size is adjusted is determined, and according to the height of each sub-page after the font size is adjusted, the first offset value is offset from the second top edge within the first information flow, and the position obtained after the offset is the first position, which is located in the target sub-page. The specified position in the user-visible area is aligned with the first position obtained by the offset. When the specified position is aligned with the first position, the display position of the target sub-page after the font size is adjusted in the user-visible area is the first display position.
[0091] Figure 4b A schematic diagram of a target subpage after font size adjustment provided by another embodiment of the present disclosure is shown in FIG. Figure 4a and Figure 4b As shown, when the target text area of the target sub-page is entirely located in the user-visible area before the font size is adjusted and the top edge of the target sub-page, that is, the first top edge, is outside the user-visible area before the font size is adjusted, the above process can calculate the first offset value, determine the first display position based on the first offset value, and display the target sub-page and non-target sub-page based on the first display position, so that the display position of the target sub-page that the user is paying attention to before and after the font size adjustment does not change significantly with the font size change in the user-visible area, so that the user can read the content of the target sub-page smoothly before and after the font size adjustment.
[0092] It can be seen that through this embodiment, when the target text area is entirely located in the user visible area before the font size is adjusted and the first top edge is outside the user visible area before the font size is adjusted, it is possible to determine the first sum value between the first distance value and the second distance value, use the first sum value as the first offset value, and then determine the first display position according to the first offset value, and display the target sub-page and non-target sub-page based on the first display position, so that the display position of the target sub-page that the user is concerned about before and after the font size adjustment does not change significantly with the font size change in the user visible area, so that the user can read the content of the target sub-page smoothly before and after the font size adjustment.
[0093] The above introduces a method for determining the first display position when the target text area of the target subpage before the font size is adjusted is entirely within the user visible area and the top edge of the target subpage is within the user visible area, and a method for determining the first display position when the target text area of the target subpage before the font size is adjusted is entirely within the user visible area and the top edge of the target subpage is outside the user visible area. The following introduces a method for determining the first display position when the target text area of the target subpage before the font size is adjusted is partially within the user visible area.
[0094] In one embodiment, the target subpage includes a target text area; before the font size is adjusted, a portion of the target text area is located in a user visible area; and determining a first display position of the target subpage in the user visible area after the font size is adjusted includes:
[0095] Determine the top edge of the target subpage as the first top edge, determine the top edge of the first information flow as the second top edge, and determine the top edge of the target text area as the third top edge;
[0096] Get the first distance value between the first top edge and the second top edge after the font size is adjusted, get the third distance value between the first top edge and the third top edge, get the fourth distance value between the third top edge and the specified position in the user visible area before the font size is adjusted, get the first height of the target text area before the font size is adjusted, and get the second height of the target text area after the font size is adjusted;
[0097] A first display position is determined according to the first distance value, the third distance value, the fourth distance value, the first height, and the second height.
[0098] Figure 5a A schematic diagram of a target subpage before font size adjustment provided by another embodiment of the present disclosure is shown in FIG. Figure 5a As shown, before the font size is adjusted, part of the target text area of the target subpage is located in the user visible area, which means that the user has most likely read part of the text content of the target subpage. In this case, similar to the previous method, the top edge of the target subpage is determined to be the first top edge, wherein the top edge of the target subpage refers to the topmost edge of the target subpage. The top edge of the first information stream is determined to be the second top edge, wherein the top edge of the first information stream refers to the topmost edge of the first information stream, and the top edge of the first information stream can be the top edge of the first subpage in the first information stream, or it can be a top edge located above the top edge of the first subpage. The top edge of the target text area is determined to be the third top edge, and the third top edge is the topmost edge of the target text area.
[0099] In this embodiment, the first distance value between the first top edge and the second top edge after the font size is adjusted is obtained. After the font size of the first information stream is adjusted, the position of the second top edge will not change. However, as the font size changes, the height of each sub-page in the first information stream may change, so that the distance value between the first top edge and the second top edge changes, and the first distance value between the first top edge and the second top edge after the font size is adjusted is obtained. In one example, the user adjusts the font size of the main text area of the first information stream. When the main text size of the first information stream increases, the height of the main text area of each sub-page in the first information stream increases, causing the distance value between the first top edge and the second top edge to also increase, and the first distance value between the first top edge and the second top edge after the font size is adjusted is obtained.
[0100] Also, obtain a third distance value between the first top edge and the third top edge. The third distance value is a preset distance between the top edge of the sub-page and the top edge of the main text area in each sub-page. The distance does not change with the change of the main text size and is a preset fixed value. Therefore, the distance value of each sub-page is the same.
[0101] And, a fourth distance value between the third top edge before the font size is adjusted and a specified position in the user visible area is obtained. The specified position is the position where the user's line of sight is located in the user visible area, for example, the top edge of the user visible area. In this embodiment, a fourth distance value between the third top edge before the font size is adjusted and the specified position in the user visible area is also obtained, for example, a fourth distance value between the third top edge before the font size is adjusted and the top edge of the user visible area is obtained.
[0102] And, obtain the first height of the target text area before the font size is adjusted, and obtain the second height of the target text area after the font size is adjusted. When the user adjusts the font size of the text area of each sub-page in the first information flow, the height of the text area will inevitably change. Therefore, the first height of the target text area before the font size is adjusted can be obtained, and the second height of the target text area after the font size is adjusted can be obtained. In this embodiment, the first display position can be determined according to the first distance value, the third distance value, the fourth distance value, the first height, and the second height.
[0103] It can be seen that through this embodiment, when the target text area of the target sub-page before the font size is adjusted is partially located in the user-visible area, the above-mentioned first distance value, third distance value, fourth distance value, first height and second height can be determined, and the first display position of the target sub-page after the font size is adjusted in the user-visible area can be accurately determined based on the first distance value, the third distance value, the fourth distance value, the first height and the second height.
[0104] In one embodiment, determining the first display position according to the first distance value, the third distance value, the fourth distance value, the first height, and the second height includes:
[0105] Determine a second offset value according to the first distance value, the third distance value, the fourth distance value, the first height, and the second height;
[0106] Determine a second position obtained by offsetting the second offset value within the first information flow starting from the second top edge; the second position is located in the target subpage;
[0107] When the designated position is aligned with the second position, the display position of the target sub-page after the font size is adjusted in the user visible area is determined as the first display position.
[0108] In this embodiment, the second offset value is determined according to the first distance value, the third distance value, the fourth distance value, the first height, and the second height, and the second position obtained by offsetting the second offset value from the second top edge inside the first information stream is determined, and the second position is located in the target subpage. After the font size of the first information stream is adjusted, as described above, the height of each subpage in the first information stream may change, and here, firstly, according to the font size adjustment preview operation, the height of each subpage after the font size adjustment is determined, and then, according to the height of each subpage after the font size adjustment, the second offset value is offset from the second top edge inside the first information stream, and the position obtained after the offset is the second position, and the second position is located in the target subpage.
[0109] In this embodiment, the designated position in the user visible area is aligned with the second position obtained by the offset. When the designated position is aligned with the second position, the display position of the target subpage in the user visible area after the font size is adjusted is the first display position.
[0110] It can be seen that through this embodiment, since the designated position is the position that the user is concerned about, and the second position is a position determined based on the above-mentioned first distance value, third distance value, fourth distance value, first height and second height, therefore, after aligning the designated position with the second position obtained by the offset, the content of the target sub-page can be displayed at the position that the user is concerned about, ensuring that the display position of the target sub-page in the user visible area after the font size adjustment matches the display position of the target sub-page in the user visible area before the font size adjustment, so that the user can continue to read the content of the target sub-page after the font size adjustment, thereby improving the user's reading experience and avoiding the situation where the content being read before the font size adjustment is out of the user's visible area due to the font size adjustment operation.
[0111] In one embodiment, determining the second offset value according to the first distance value, the third distance value, the fourth distance value, the first height, and the second height includes:
[0112] determining a ratio between the second height and the first height, and adjusting the fourth distance value according to the ratio;
[0113] A second sum value among the first distance value, the third distance value and the adjusted fourth distance value is determined, and the second sum value is used as a second offset value.
[0114] by Figure 5a For example, before the font size is adjusted, the target text area of the target subpage is partially located in the user-visible area. Figure 5a The third distance value, the fourth distance value and the first height are shown in FIG. 1. The first distance value and the second height are not shown.
[0115] In this embodiment, the second height is the height of the target text area after the font size is adjusted, and the first height is the height of the target text area before the font size is adjusted. The ratio obtained by dividing the second height by the first height is calculated, and the ratio is the ratio between the second height and the first height. The fourth distance value is multiplied by the ratio to obtain the adjusted fourth distance value. Since the fourth distance value is the distance between the third top edge and the specified position in the user-visible area before the font size is adjusted, the adjusted fourth distance value is the distance between the third top edge and the specified position in the user-visible area after the font size is adjusted. The second sum value between the first distance value, the third distance value, and the adjusted fourth distance value is calculated, and the second sum value is used as the second offset value.
[0116] According to the font size adjustment preview operation, the height of each sub-page after the font size is adjusted is determined, and according to the height of each sub-page after the font size is adjusted, the second offset value is offset from the second top edge within the first information flow, and the position obtained after the offset is the second position, and the second position is located in the target sub-page. The specified position in the user visible area is aligned with the second position obtained by the offset, and when the specified position is aligned with the second position, the display position of the target sub-page after the font size is adjusted in the user visible area is the first display position.
[0117] Figure 5b A schematic diagram of a target subpage after font size adjustment provided by another embodiment of the present disclosure is shown in FIG. Figure 5a and Figure 5b As shown, when the target text area of the target sub-page is partially located in the user-visible area before the font size is adjusted, the second offset value can be calculated through the above process, and the first display position is determined according to the second offset value. The target sub-page and non-target sub-page are displayed based on the first display position, so that the display position of the target sub-page that the user pays attention to before and after the font size adjustment does not change significantly with the font size change in the user-visible area, so that the user can read the content of the target sub-page smoothly before and after the font size adjustment.
[0118] It can be seen that through this embodiment, when the target text area is partially located in the user-visible area before the font size is adjusted, the ratio between the second height and the first height can be determined, the fourth distance value is adjusted according to the ratio, and the second sum value between the first distance value, the third distance value and the adjusted fourth distance value is determined. The second sum value is used as the second offset value, and then the first display position is determined according to the second offset value. The target sub-page and non-target sub-page are displayed based on the first display position, so that the display position of the target sub-page that the user is concerned about before and after the font size adjustment does not change significantly with the font size change in the user-visible area, so that the user can read the content of the target sub-page smoothly before and after the font size adjustment.
[0119] As can be seen from the foregoing introduction, in this embodiment, when determining the first display position, it is necessary to determine the offset value, determine the height of each sub-page after the font size is adjusted according to the font size adjustment preview operation, and offset the offset value from the second top edge to obtain a position within the first information flow according to the height of each sub-page after the font size is adjusted. When aligning the specified position in the user visible area with the position, the display position of the target sub-page after the font size is adjusted in the user visible area is determined as the first display position. This embodiment describes how to determine the offset value in three cases, and these three cases are summarized below.
[0120] Case 1: before the font size is adjusted, the target text area of the target subpage is entirely located in the user visible area and the first top edge of the target subpage is located in the user visible area before the font size is adjusted.
[0121] In this case, the above offset value = cardoffsetY - cardDeltaY;
[0122] Wherein, cardoffsetY represents the first distance value between the first top edge of the target subpage and the second top edge of the first information flow after the font size is adjusted, which is a positive value. cardDeltaY represents the second distance value between the first top edge of the target subpage and the specified position in the user visible area before the font size is adjusted, which is a positive value.
[0123] Case 2: before the font size is adjusted, the target text area of the target subpage is entirely located in the user visible area and the first top edge of the target subpage is located outside the user visible area before the font size is adjusted.
[0124] In this case, the above offset value = cardoffsetY + cardDeltaY;
[0125] Wherein, cardoffsetY represents the first distance value between the first top edge of the target subpage and the second top edge of the first information flow after the font size is adjusted, which is a positive value. cardDeltaY represents the second distance value between the first top edge of the target subpage and the specified position in the user visible area before the font size is adjusted, which is a positive value.
[0126] Case 3: before the font size is adjusted, the target text area of the target subpage is partially located in the user visible area.
[0127] Offset value =
[0128] cardoffsetY+cardTopoffsetY+contentMaxHeight target / contentMaxHeight origin
[0129] *contentOffset origin ;
[0130] Wherein, cardoffsetY represents the first distance value between the first top edge of the target subpage and the second top edge of the first information flow after the font size is adjusted, which is a positive value. cardTopoffsetY represents the third distance value between the first top edge of the target subpage and the third top edge of the target text area, which is a positive value. contentMaxHeight target Indicates the second height of the target text area after the font size is adjusted. It is a positive value. contentMaxHeight origin Indicates the first height of the target text area before the font size is adjusted. It is a positive value. contentOffset origin Represents the fourth distance value between the third top edge and the specified position in the user visible area before the font size is adjusted, which is a positive value.
[0131] Further, Figure 1 The process also includes:
[0132] In response to a sliding operation on the first information stream, when the second sub-page with the adjusted font size slides to the user-visible area, the second sub-page with the adjusted font size is displayed.
[0133] In this embodiment, the user can browse the contents of each sub-page in the order of each sub-page by sliding. In response to the user's sliding operation on the first information stream, when the user slides to the second sub-page, that is, when the second sub-page with adjusted font size slides to the user's visible area, the terminal device displays the second sub-page with adjusted font size.
[0134] In this embodiment, when the user needs to browse the second sub-page, the second sub-page with the adjusted font size is displayed, thereby improving the user's browsing experience for the first information flow.
[0135] In summary, through the above embodiments, at least the following technical effects are achieved:
[0136] 1. When the user previews the first font size information, only the first sub-page is rendered. When the user confirms the first font size information, the second sub-page is rendered, thereby saving the computer resource overhead caused by page rendering during font size preview and improving the efficiency of font size adjustment for the first information flow;
[0137] 2. The accurate first display position is obtained by determining the above-mentioned offset value, and the first sub-page is displayed according to the first display position, so that the display position of the first sub-page in the user visible area after the font size adjustment matches the display position of the first sub-page in the user visible area before the font size adjustment, so that the user can continue to read the content of the first sub-page after the font size adjustment, thereby improving the user's reading experience and avoiding the situation where the content read before the font size adjustment is out of the user's visible area due to the font size adjustment operation.
[0138] Figure 6 A schematic diagram of the structure of a font size adjustment device provided in an embodiment of the present disclosure is shown in FIG. Figure 6 As shown, the device comprises:
[0139] The page display unit 61 is used to display at least one first sub-page in the first information flow in the user visible area;
[0140] A first adjustment unit 62 is configured to adjust the font size of the first sub-page according to the first font size information to be previewed in response to the font size adjustment preview operation for the first information stream, and display the first sub-page after the font size adjustment in the user visible area;
[0141] The second adjustment unit 63 is used to respond to the font size adjustment determination operation for the first font size information, continuously display the first sub-page after the font size adjustment, and adjust the font size of the second sub-page according to the first font size information; the second sub-page is a sub-page in the first information flow other than the first sub-page; the second sub-page after the font size adjustment is displayed when it is located in the user visible area.
[0142] Optionally, the first adjustment unit 62 is specifically used to: determine the display position of the first sub-page in the user-visible area after the font size is adjusted; match the display position of the first sub-page in the user-visible area after the font size is adjusted with the display position of the first sub-page in the user-visible area before the font size is adjusted; and display the first sub-page after the font size is adjusted according to the display position of the first sub-page in the user-visible area after the font size is adjusted.
[0143] Optionally, the first adjustment unit 62 is also specifically used to: determine the target subpage and the non-target subpage in each of the first subpages; the target subpage is the first subpage in each of the first subpages that occupies the largest area in the user-visible area; the non-target subpage is the first subpage in each of the first subpages other than the target subpage; determine the first display position of the target subpage in the user-visible area after the font size is adjusted; and determine the second display position of the non-target subpage in the user-visible area after the font size is adjusted based on the first display position.
[0144] Optionally, the target sub-page includes a target text area; the target text area is entirely located in the user-visible area before the font size is adjusted; the first adjustment unit 62 is also specifically used to: determine the top edge of the target sub-page as the first top edge, and determine the top edge of the first information flow as the second top edge; obtain a first distance value between the first top edge and the second top edge after the font size is adjusted, and obtain a second distance value between the first top edge and a specified position in the user-visible area before the font size is adjusted; determine the first display position based on the first distance value and the second distance value.
[0145] Optionally, the first adjustment unit 62 is also specifically used to: determine a first offset value based on the first distance value and the second distance value; determine a first position obtained by offsetting the first offset value within the first information flow starting from the second top edge; the first position is located in the target sub-page; when aligning the specified position with the first position, the display position of the target sub-page after the font size is adjusted in the user visible area is determined to be the first display position.
[0146] Optionally, before the font size is adjusted, the first top edge is located in the user visible area; the first adjustment unit 62 is further specifically used to: determine a difference between the first distance value and the second distance value, and use the difference as the first offset value.
[0147] Optionally, before the font size is adjusted, the first top edge is located outside the user visible area; the first adjustment unit 62 is further specifically used to: determine a first sum value between the first distance value and the second distance value, and use the first sum value as the first offset value.
[0148] Optionally, the target sub-page includes a target text area; before the font size is adjusted, part of the target text area is located in the user-visible area; the first adjustment unit 62 is also specifically used to: determine the top edge of the target sub-page as the first top edge, determine the top edge of the first information flow as the second top edge, and determine the top edge of the target text area as the third top edge; obtain the first distance value between the first top edge and the second top edge after the font size is adjusted, obtain the third distance value between the first top edge and the third top edge, obtain the fourth distance value between the third top edge and the specified position in the user-visible area before the font size is adjusted, obtain the first height of the target text area before the font size is adjusted, and obtain the second height of the target text area after the font size is adjusted; determine the first display position according to the first distance value, the third distance value, the fourth distance value, the first height and the second height.
[0149] Optionally, the first adjustment unit 62 is also specifically used to: determine a second offset value based on the first distance value, the third distance value, the fourth distance value, the first height and the second height; determine a second position obtained by offsetting the second offset value within the first information flow starting from the second top edge; the second position is located in the target sub-page; when aligning the specified position with the second position, the display position of the target sub-page after the font size is adjusted in the user visible area is determined to be the first display position.
[0150] Optionally, the first adjustment unit 62 is also specifically used to: determine the ratio between the second height and the first height, and adjust the fourth distance value according to the ratio; determine a second sum value between the first distance value, the third distance value and the adjusted fourth distance value, and use the second sum value as the second offset value.
[0151] Optionally, a second sub-page display unit is further included, which is used to: in response to a sliding operation on the first information flow, when the second sub-page with adjusted font size slides to the user-visible area, display the second sub-page with adjusted font size.
[0152] The font size adjustment device in the embodiment of the present disclosure can implement each process of the above-mentioned font size adjustment method embodiment and achieve the same effect and function, which will not be repeated here.
[0153] An embodiment of the present disclosure further provides an electronic device, Figure 7 A schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure, such as Figure 7 As shown, the electronic device may have relatively large differences due to different configurations or performances, and may include one or more processors 701 and memory 702, and one or more applications or data may be stored in the memory 702. Among them, the memory 702 may be a temporary storage or a permanent storage. The application stored in the memory 702 may include one or more modules (not shown in the figure), and each module may include a series of computer executable instructions in the electronic device. Furthermore, the processor 701 may be configured to communicate with the memory 702 to execute a series of computer executable instructions in the memory 702 on the electronic device. The electronic device may also include one or more power supplies 703, one or more wired or wireless network interfaces 704, one or more input or output interfaces 705, one or more keyboards 706, etc.
[0154] In a specific embodiment, the electronic device includes a processor; and a memory configured to store computer executable instructions, wherein when the computer executable instructions are executed, the processor implements the following process:
[0155] Displaying at least one first sub-page in the first information stream in the user-visible area;
[0156] In response to the font size adjustment preview operation for the first information stream, adjusting the font size of the first subpage according to the first font size information to be previewed, and displaying the first subpage after the font size adjustment in the user visible area;
[0157] In response to a font size adjustment determination operation for the first font size information, the first sub-page after the font size adjustment is continuously displayed, and the font size of the second sub-page is adjusted according to the first font size information; the second sub-page is a sub-page in the first information flow other than the first sub-page; the second sub-page after the font size adjustment is displayed when it is located in the user visible area.
[0158] The electronic device in the embodiment of the present disclosure can implement each process of the above-mentioned font size adjustment method embodiment and achieve the same effect and function, which will not be repeated here.
[0159] Another embodiment of the present disclosure further provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store computer-executable instructions, and when the computer-executable instructions are executed by a processor, the following process is implemented:
[0160] Displaying at least one first sub-page in the first information stream in the user-visible area;
[0161] In response to the font size adjustment preview operation for the first information stream, adjusting the font size of the first subpage according to the first font size information to be previewed, and displaying the first subpage after the font size adjustment in the user visible area;
[0162] In response to a font size adjustment determination operation for the first font size information, the first sub-page after the font size adjustment is continuously displayed, and the font size of the second sub-page is adjusted according to the first font size information; the second sub-page is a sub-page in the first information flow other than the first sub-page; the second sub-page after the font size adjustment is displayed when it is located in the user visible area.
[0163] The storage medium in the embodiment of the present disclosure can implement each process of the above-mentioned font size adjustment method embodiment and achieve the same effect and function, which will not be repeated here.
[0164] Another embodiment of the present disclosure further provides a computer program product, the computer program product comprising a computer program, and when the computer program is executed by a processor, the following process is implemented:
[0165] Displaying at least one first sub-page in the first information stream in the user-visible area;
[0166] In response to the font size adjustment preview operation for the first information stream, adjusting the font size of the first subpage according to the first font size information to be previewed, and displaying the first subpage after the font size adjustment in the user visible area;
[0167] In response to a font size adjustment determination operation for the first font size information, the first sub-page after the font size adjustment is continuously displayed, and the font size of the second sub-page is adjusted according to the first font size information; the second sub-page is a sub-page in the first information flow other than the first sub-page; the second sub-page after the font size adjustment is displayed when it is located in the user visible area.
[0168] The computer program product in the embodiment of the present disclosure can implement each process of the above-mentioned font size adjustment method embodiment and achieve the same effect and function, which will not be repeated here.
[0169] In various embodiments of the present disclosure, the computer-readable storage medium includes a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0170] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0171] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.
[0172] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0173] For the convenience of description, the above devices are described in terms of functions and are divided into various units. Of course, when implementing the embodiments of the present disclosure, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0174] Those skilled in the art will appreciate that one or more embodiments of the present disclosure may be provided as a method, system or computer program product. Therefore, one or more embodiments of the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, one or more embodiments of the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0175] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0176] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0177] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0178] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0179] One or more embodiments of the present disclosure may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. One or more embodiments of the present disclosure may also be practiced in distributed computing environments in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0180] Each embodiment in the present disclosure is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0181] The above description is only an embodiment of the present disclosure and is not intended to limit the present disclosure. For those skilled in the art, the present disclosure may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present disclosure shall be included in the scope of the claims of the present disclosure.
Claims
1. A font size adjustment method, characterized in that: include: Displaying at least one first sub-page in the first information stream in the user-visible area; In response to the font size adjustment preview operation for the first information stream, adjusting the font size of the first subpage according to the first font size information to be previewed, and displaying the first subpage after the font size adjustment in the user visible area; In response to a font size adjustment determination operation for the first font size information, the first sub-page after the font size adjustment is continuously displayed, and the font size of the second sub-page is adjusted according to the first font size information; the second sub-page is a sub-page in the first information flow other than the first sub-page; the second sub-page after the font size adjustment is displayed when it is located in the user visible area.
2. The method according to claim 1, characterized in that: The step of displaying the first sub-page with the font size adjusted in the user-visible area includes: determining a display position of the first subpage in the user-visible area after the font size is adjusted; the display position of the first subpage in the user-visible area after the font size is adjusted matches the display position of the first subpage in the user-visible area before the font size is adjusted; The first sub-page with the adjusted font size is displayed according to the display position of the first sub-page with the adjusted font size in the user visible area.
3. The method according to claim 2, characterized in that The step of determining a display position of the first sub-page after the font size is adjusted in the user visible area includes: Determine a target subpage and a non-target subpage in each of the first subpages; the target subpage is the first subpage with the largest area in the user visible area in each of the first subpages; the non-target subpage is the first subpage other than the target subpage in each of the first subpages; Determine a first display position of the target subpage after the font size is adjusted in the user visible area; According to the first display position, a second display position of the non-target sub-page after the font size is adjusted in the user visible area is determined.
4. The method according to claim 3, characterized in that The target subpage includes a target text area; the target text area is entirely located in the user visible area before the font size is adjusted; and the determination of the first display position of the target subpage in the user visible area after the font size is adjusted includes: Determine the top edge of the target subpage as a first top edge, and determine the top edge of the first information flow as a second top edge; Acquire a first distance value between the first top edge and the second top edge after the font size is adjusted, and acquire a second distance value between the first top edge and a specified position in the user visible area before the font size is adjusted; The first display position is determined according to the first distance value and the second distance value.
5. The method according to claim 4, characterized in that The determining the first display position according to the first distance value and the second distance value includes: determining a first offset value according to the first distance value and the second distance value; Determine a first position obtained by offsetting the first offset value from the second top edge within the first information flow; the first position is located in the target subpage; When the designated position is aligned with the first position, the display position of the target sub-page after the font size is adjusted in the user visible area is determined as the first display position.
6. The method according to claim 5, characterized in that Before the font size is adjusted, the first top edge is located in the user visible area; and determining the first offset value according to the first distance value and the second distance value includes: A difference between the first distance value and the second distance value is determined, and the difference is used as the first offset value.
7. The method according to claim 5, characterized in that Before the font size is adjusted, the first top edge is located outside the user visible area; and determining the first offset value according to the first distance value and the second distance value includes: A first sum value between the first distance value and the second distance value is determined, and the first sum value is used as the first offset value.
8. The method according to claim 3, characterized in that The target subpage includes a target text area; the target text area is partially located in the user visible area before the font size is adjusted; and the first display position of the target subpage in the user visible area after the font size is adjusted is determined, including: Determine the top edge of the target subpage as the first top edge, determine the top edge of the first information flow as the second top edge, and determine the top edge of the target text area as the third top edge; Obtain a first distance value between the first top edge and the second top edge after the font size is adjusted, obtain a third distance value between the first top edge and the third top edge, obtain a fourth distance value between the third top edge and a specified position in the user visible area before the font size is adjusted, obtain a first height of the target text area before the font size is adjusted, and obtain a second height of the target text area after the font size is adjusted; The first display position is determined according to the first distance value, the third distance value, the fourth distance value, the first height, and the second height.
9. The method according to claim 8, characterized in that The determining the first display position according to the first distance value, the third distance value, the fourth distance value, the first height, and the second height includes: determining a second offset value according to the first distance value, the third distance value, the fourth distance value, the first height, and the second height; Determine a second position obtained by offsetting the second offset value within the first information flow from the second top edge; the second position is located in the target subpage; When the designated position is aligned with the second position, the display position of the target sub-page after the font size is adjusted in the user visible area is determined as the first display position.
10. The method according to claim 9, characterized in that The determining a second offset value according to the first distance value, the third distance value, the fourth distance value, the first height, and the second height includes: determining a ratio between the second height and the first height, and adjusting the fourth distance value according to the ratio; A second sum value among the first distance value, the third distance value and the adjusted fourth distance value is determined, and the second sum value is used as the second offset value.
11. The method according to claim 1, characterized in that: Also includes: In response to a sliding operation on the first information flow, when the second sub-page with adjusted font size slides to the user-visible area, the second sub-page with adjusted font size is displayed.
12. A font size adjustment device, characterized in that: include: A page display unit, configured to display at least one first sub-page in the first information stream in a user-visible area; A first adjustment unit is configured to, in response to a font size adjustment preview operation for the first information stream, adjust the font size of the first sub-page according to the first font size information to be previewed, and display the first sub-page after the font size adjustment in the user visible area; A second adjustment unit is used to respond to a font size adjustment determination operation for the first font size information, continuously display the first sub-page after the font size adjustment, and adjust the font size of the second sub-page according to the first font size information; the second sub-page is a sub-page in the first information flow other than the first sub-page; the second sub-page after the font size adjustment is displayed when it is located in the user visible area.
13. An electronic device, characterized in that: include: processor; as well as, A memory configured to store computer executable instructions, which, when executed, cause the processor to implement the steps of the method according to any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store computer-executable instructions, and the computer-executable instructions, when executed by a processor, implement the steps of the method described in any one of claims 1 to 11.
15. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.
