Font adjusting method and device, electronic equipment and storage medium
By obtaining the actual size and resolution of the display screen, the font size is automatically determined and adjusted, which solves the problem of cumbersome user operation in the existing technology and improves user experience, especially the convenience for users with vision loss or visual impairment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-03
- Publication Date
- 2026-03-20
AI Technical Summary
In existing technologies, adjusting font size is a cumbersome process for users, resulting in a poor user experience. This is especially true for elderly people with declining vision or visually impaired individuals, who find it difficult to conveniently adjust the font size on electronic device displays.
By obtaining the actual size and resolution of the display screen, as well as the pixel value of the target text, the system automatically determines whether the user needs to adjust the font size. Under certain conditions, the font size can be increased without user intervention, and the system will adjust the size after confirming the user's needs using voice or text prompts.
It enables more efficient and simpler font size adjustment, improving the user experience, especially the ease of use for users with vision loss or visual impairment.
Smart Images

Figure CN116069276B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, and in particular to a font adjustment method and device, electronic equipment and storage medium. BACKGROUND
[0002] With the continuous development of science and technology and the continuous improvement of people's living standards, electronic devices such as mobile phones, notebook computers, tablet computers, desktop computers and the like have become essential tools in people's daily life. More and more users use the functions of electronic devices to realize various personalized needs, such as mobile payment, online chat, and browsing news on webpages. When users use the functions of electronic devices, they rely on the text content displayed in the display screen of the electronic device to perform related operations.
[0003] Different users have different needs for the font size of the text displayed in the display screen of the electronic device. For example, for the elderly or visually impaired people with reduced vision, the electronic device display screen needs to display larger font text so that the elderly or visually impaired people with reduced vision can see the text content displayed in the electronic device display screen.
[0004] Generally, each electronic device is equipped with a set of operating system. In the prior art, a user can set the font size of the system text by sequentially opening the system setting function and the font setting sub-function after multiple preset operations, or the user can set the font size of the text in the display interface of a third-party application by sequentially opening the setting function and the font setting sub-function of the third-party application after multiple preset operations in the display interface of the third-party application. However, the above font adjustment method requires multiple user operations, which is relatively cumbersome and has poor user perception. SUMMARY
[0005] The present application provides a font adjustment method, device, electronic equipment and storage medium to solve the defect that the user operation is relatively cumbersome when adjusting the font size in the prior art, and to realize simpler adjustment of the font size.
[0006] The present application provides a font adjustment method, comprising:
[0007] Based on the actual size and the current resolution of the display screen and the pixel value of each pixel point corresponding to the first target text displayed on the display screen, the actual size of the first target text is obtained.
[0008] Based on the actual size of the first target text, the font size of the first target text is adjusted.
[0009] The font adjustment method provided by the present application comprises:
[0010] The first target text with an actual size less than a size threshold is determined as a second target text, and the font size of the first target text is adjusted based on the number of the second target text.
[0011] The font adjustment method provided by the present application comprises:
[0012] In the case that the number of the second target text is greater than a number threshold and no first input of the user is received within a target period, the font of the first target text is increased.
[0013] The font adjustment method provided by the present application comprises:
[0014] The target prompt information is sent out.
[0015] In the case that the second input of the user indicating confirmation of increasing the font of the first target text is received, the font of the first target text is increased.
[0016] The target prompt information is voice prompt information.
[0017] Correspondingly, the target prompt information is sent out by:
[0018] The voice system is controlled to generate and play the target prompt information.
[0019] The target prompt information is text prompt information.
[0020] Correspondingly, the target prompt information is sent out by:
[0021] The target prompt information is displayed on the display screen.
[0022] The font adjustment method provided by the present application further comprises:
[0023] The size threshold is determined based on the actual size of the system text.
[0024] According to the font adjustment method provided in the application, in the case that the number of the second target characters is greater than the number threshold and no first input of the user is received within the target period, before the font of the first target character is increased, the method further comprises:
[0025] obtaining at least one sample duration;
[0026] obtaining the duration of the target period based on the sample duration;
[0027] The sample duration is the duration required for the sample electronic device to first receive a third input of a sample user since the display screen of the sample electronic device displays the first target character.
[0028] The application further provides a font adjustment device, comprising:
[0029] a data obtaining module, configured to obtain the actual size of the first target character based on the actual size and the current resolution of the display screen and the pixel value of each pixel point corresponding to the first target character displayed on the display screen;
[0030] a font adjustment module, configured to adjust the font size of the first target character based on the actual size of the first target character.
[0031] The application further provides an electronic device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the font adjustment method according to any one of the above when executing the program.
[0032] The application further provides a non-transitory computer readable storage medium, having a computer program stored thereon, wherein the computer program is executable by a processor to implement the steps of the font adjustment method according to any one of the above.
[0033] The application further provides a computer program product, comprising a computer program, wherein the computer program is executable by a processor to implement the steps of the font adjustment method according to any one of the above.
[0034] The font adjustment method, device, electronic device and storage medium provided in the application can obtain the actual size of the first target character based on the actual size and the current resolution of the display screen and the pixel value of each pixel point corresponding to the first target character displayed on the display screen, and adjust the font of the first target character based on the actual size of the first target character, so that the user's demand for adjusting the font size can be determined based on the actual size of the first target character, and the font can be increased without the user's tedious operation in the case that the user has the demand for adjusting the font size, the font can be adjusted more efficiently and simply, and the user's perception can be improved. BRIEF DESCRIPTION OF DRAWINGS
[0035] In order to more clearly illustrate the technical solutions of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings described below are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort based on these drawings.
[0036] Figure 1 is one of the flowcharts of the font adjustment method provided by the present application;
[0037] Figure 2 is another flowchart of the font adjustment method provided by the present application;
[0038] Figure 3 is a structural schematic diagram of the font adjustment device provided by the present application;
[0039] Figure 4 is a structural schematic diagram of the electronic device provided by the present application. DETAILED DESCRIPTION
[0040] In order to make the objects, technical solutions and advantages of the present application clearer, the technical solutions of the present application will be described clearly and completely below in combination with the drawings in the present application. Obviously, the described embodiments are only some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort fall within the scope of protection of the present application.
[0041] In the description of the present application, it should be noted that unless otherwise explicitly specified and limited, the terms "mounting", "connecting", "connecting" should be understood in a broad sense, for example, it can be fixed connection, or detachable connection, or integral connection; it can be mechanical connection, or electrical connection; it can be directly connected, or indirectly connected through intermediate medium, or the communication inside two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.
[0042] Figure 1 is a flowchart of the font adjustment method provided by the present application. The font adjustment method of the present application will be described below in combination with Figure 1 As shown in Figure 1 , the method comprises the following steps: step 101, based on the actual size and current resolution of the display screen, and the pixel value of each pixel point corresponding to the first target text displayed on the display screen, the actual size of the first target text is obtained.
[0043] It should be noted that the execution subject of the embodiment of the present application is a font adjustment device, and the font adjustment device can be an electronic device. The font size of the text displayed on the display screen of the electronic device can be adjusted based on the font adjustment method provided by the present application.
[0044] The electronic device in the embodiment of the present application can include at least one display screen. The display screen can be a foldable folding screen or a non-foldable non-folding screen. The actual size of the display screen can be obtained based on prior knowledge. The current resolution of the display screen can be obtained by checking the system settings of the electronic device.
[0045] Optionally, the first target text can include part or all of the text in the display screen.
[0046] In order to more accurately determine whether the user currently has the demand for adjusting the font size, and to avoid misjudging that the user has the demand for adjusting the font size in the case that the electronic device is in a standby state, a reading state or a viewing state, the target interface can be determined based on the interface display content and the functional characteristics of the interface, for example, the login interface, the chat conversation interface and the like of a certain third-party application can be taken as the target interface.
[0047] The first target text can include all the text in the target interface. Accordingly, in the case that the display screen of the electronic device displays the target interface, the font size of the first target text can be adjusted based on the font adjustment method provided by the present application.
[0048] Each pixel point corresponding to the first target text can be determined based on image recognition. After determining each pixel point corresponding to the first target text, the pixel value of each pixel point corresponding to the first target text can be further obtained.
[0049] Based on the actual size of the display screen of the electronic device, the current resolution of the display screen of the electronic device and the target parameters corresponding to the first target text, the actual size of the first target text can be obtained by numerical calculation.
[0050] It should be noted that the actual size of the first target text can include the area of the first target text, for example, the area of the first target text can be 15 square millimeters. The area of the first target text can refer to the area of a square determined based on the highest point, the lowest point, the leftmost point and the rightmost point of the first target text. The actual size of the first target text can also include the height and width of the first target text, for example, the height* width of the first target text can be 5mm*3mm. The height of the first target text can refer to the height of the square, and the width of the first target text can refer to the width of the square.
[0051] It should be noted that, in the case that the electronic device includes multiple display screens, the actual size of the first target text displayed on each display screen of the electronic device can be obtained based on the actual size and the current resolution of each display screen of the electronic device, and the pixel value of each pixel point corresponding to the first target text displayed on each display screen.
[0052] In step 102, the font size of the first target text is adjusted based on the actual size of the first target text.
[0053] Specifically, based on the actual size of the first target text displayed on the display screen, it can be determined whether the user currently has a demand to adjust the font size of the first target text, and the font size of the first target text can be adjusted according to the current demand of the user.
[0054] For example, if the actual size of the display screen is large, but the actual size of the first target text is small, it can be considered that the user currently has a demand to increase the font size of the first target text; or, if the actual size of the display screen is small, but the actual size of the first target text is large, it can be considered that the user currently has a demand to decrease the font size of the first target text; or, if the actual size of the first target text is small, and the electronic device does not receive the input of the user within a certain time, it can be considered that the user currently has a demand to increase the font size of the first target text.
[0055] The font size of the first target text can be adjusted in various ways. For example, in the case that the first target text includes system text, a control instruction for adjusting the font size of the system text can be called in the background to adjust the font size of the system text in the first target text; or, in the case that the first target text includes text in a third-party application, a control instruction for adjusting the font size of the text in the third-party application can be called in the background to adjust the text in the third-party application in the first target text; or, in the case that the first target text includes text in a picture, a control instruction for zooming in the picture can be called in the background to adjust the font size of the text in the picture included in the first target text.
[0056] The embodiments of the present application can obtain the actual size of the first target text based on the actual size and the current resolution of the display screen, and the pixel value of each pixel point corresponding to the first target text displayed on the display screen, and adjust the font of the first target text based on the actual size of the first target text. Based on the actual size of the first target text, it can be determined whether the user has a demand to adjust the font size, and in the case that the user has a demand to adjust the font size, the font can be increased without the user performing complicated operations, the font can be adjusted more efficiently and simply, and the user perception can be improved.
[0057] Based on the content of the above embodiments, the font of the first target text is adjusted based on the actual size of the first target text, including: determining the first target text with an actual size less than a size threshold as a second target text, and adjusting the font size of the first target text based on the number of second target texts.
[0058] Specifically, after obtaining the actual size of the first target text, the actual size of the first target text can be compared with a size threshold.
[0059] If the actual size of any first target text is less than the size threshold, the first target text can be determined as a second target text.
[0060] It should be noted that the size threshold can be determined according to the actual situation. In the case that the actual size of the first target text includes the height and width of the first target text, the size threshold can include a height threshold and a width threshold, and if the height of any first target text is less than the height threshold and the width is less than the width threshold, the first target text can be determined as a second target text. The size threshold is not specifically limited in the embodiments of the present application.
[0061] After comparing the actual size of the first target text with the size threshold, the number of second target texts can be counted.
[0062] After obtaining the number of second target texts displayed on the display screen, it can be determined whether the user currently has a demand for adjusting the font size of the first target text based on the number of second target texts, and the font size of the first target text can be adjusted according to the current demand of the user.
[0063] For example, it can be determined whether the user currently has a demand for increasing the font of the first target text based on the number of second target texts. Specifically, the size threshold can be set based on the maximum font size that the user can see in the display screen, and if the number of second target texts with an actual size less than the size threshold is greater than a certain preset value, it can be considered that the user cannot see the first target text displayed on the display screen, and has a demand for increasing the font of the first target text, and the font size of the first target text can be increased.
[0064] For example, the number of second target characters can be used to determine whether the user currently has a demand to reduce the font size of the first target character. Specifically, if the user has normal vision and does not want the font size of the first target character on the display screen to be too large, resulting in too little text content on the display screen, a larger size threshold can be set according to the user's demand. If the number of second target characters with an actual size smaller than the size threshold is greater than a predetermined value, it can be considered that the font size of the first target character is large, and the user currently has a demand to reduce the font size of the first target character, and the font size of the first target character can be reduced.
[0065] The embodiments of the present application determine the first target character with an actual size smaller than the size threshold as the second target character, adjust the font size of the first target character based on the number of second target characters displayed on the display screen, and can determine whether the user has a demand to adjust the font size based on the number of second target characters. In the case where the user has a demand to adjust the font size, the font size can be increased without the user performing complicated operations, the font size can be adjusted more efficiently and simply, and the user experience can be improved.
[0066] Based on the above embodiments, the font size of the first target character is adjusted based on the number of second target characters, including: in the case where the number of second target characters is greater than a number threshold and no first input of the user is received within a target period, the font size of the first target character is increased.
[0067] It should be noted that, in general, after the user adjusts the font size of the system text through multiple operations, the font size of the text in the third-party application display interface and / or the text in the picture is still the default font size, and the user needs to repeatedly perform multiple operations to adjust the font size of the text in the third-party application display interface and / or the text in the picture. The user operation is relatively complicated. Moreover, in some special scenarios, for example, the user currently has difficulty in clearly seeing the text content displayed on the display screen of the electronic device, or the user has a demand to adjust the font size but is not familiar with the operation of the electronic device, etc. In these scenarios, the user is difficult to adjust the font size of at least one of the system text, the text in the third-party application display interface, and the text in the picture through the above relatively complicated operations, and the user experience is poor.
[0068] Specifically, the font adjustment method provided by the present application can determine whether the user currently has a demand to increase the font size of the first target character based on the interaction between the user and the electronic device and the number of second target characters, and automatically increase the font size of the first target character in the case where the user currently has a demand to increase the font size of the first target character.
[0069] The number of second target characters can be compared with a number threshold.
[0070] If it is judged that the number of the second target text is greater than the number threshold, it can be further judged whether the electronic device receives the first input of the user within the target period.
[0071] If it is judged that the number of the second target text is greater than the number threshold and the electronic device does not receive the first input of the user within the target period, it can be indicated that the user currently cannot clearly see the first target text, and there is a demand to increase the font of the first target text in the target interface. The font of the first target text can be increased in various ways.
[0072] It should be noted that the starting time of the target period can be the time when the electronic device display screen starts to display the first target text or starts to display the target interface. The length of the target period can be determined according to actual conditions, for example, the length of the target period can be determined based on user behavior data. The length of the target period in the embodiment of the application is not specifically limited.
[0073] It should be noted that the first input of the user can be manifested as a touch output to the electronic device, and the touch output can include but is not limited to click input, sliding input, and pressing input. The first input of the user can also be manifested as a corresponding physical button input of the electronic device. The first input of the user can also be manifested as a voice input of the user.
[0074] It can be understood that the above-mentioned various inputs are exemplary, that is, the embodiments of the present application include but are not limited to the above-mentioned various inputs. In actual implementation, the first input of the user can also include other any possible input, which can be specifically determined according to actual use requirements, and the embodiments of the present application are not limited.
[0075] The embodiments of the present application can increase the font of the first target text after determining that the number of the second target text with an actual size less than the size threshold is greater than the number threshold and the first input of the user is not received within the target period. Based on the interaction between the user and the electronic device and the actual size of the text in the target interface, it can be judged whether the user has a demand to increase the font, and in the case that the user has a demand to increase the font, the font can be increased without the user performing complicated operations. The font can be adjusted more efficiently and simply, and the user perception can be improved.
[0076] Based on the content of the above-mentioned embodiments, increasing the font of the first target text includes: issuing a target prompt information.
[0077] Specifically, if it is judged that the number of the second target text is greater than the number threshold and the electronic device does not receive the first input of the user within the target period, a target prompt information can be issued to prompt the user of the electronic device whether the font of the first target text needs to be increased currently.
[0078] It should be noted that the target prompt information can be voice prompt information. The target prompt information can also be text prompt information displayed on the display screen of the electronic device. The display form of the text prompt information on the display screen can be a pop-up window, a bubble, or the like. The form of the target prompt information on the display screen is not limited in the embodiments of the present application.
[0079] Optionally, the target prompt information can also carry an adjustment suggestion for increasing the font of the first target text. For example, in the case of voice prompt information, the target prompt information can include: "Do you need to increase the font in the interface by 1 times?" Or, in the case of text prompt information, the target prompt information can include the multiple of the increased font for the user to select.
[0080] It should be noted that in the case of text prompt information, the actual size of the displayed text of the target prompt information on the display screen needs to be greater than the actual size of the first target text.
[0081] In the case where the second input indicating that the user confirms to increase the font of the first target text is received, the font of the first target text is increased.
[0082] Specifically, after the target prompt information is sent out, if the user has a demand to increase the font of the first target text, the user can input a second input indicating that the font of the first target text is determined to be increased.
[0083] It should be noted that the second input of the user can be a touch output of the electronic device, which can include but is not limited to a click input, a sliding input, a pressing input, and the like. The second input of the user can also be an input of a corresponding physical key of the electronic device. The second input of the user can also be a voice input of the user.
[0084] It can be understood that the above-mentioned inputs are exemplary, that is, the embodiments of the present application include but are not limited to the above-mentioned inputs. In actual implementation, the second input of the user can also include other possible inputs, which can be determined according to actual use requirements, and the embodiments of the present application are not limited.
[0085] After it is determined that the second input indicating that the user determines to increase the font of the first target text is received, the font of the first target text can be increased.
[0086] The embodiment of the present application can more accurately determine the user's demand, and can increase the font without the user's tedious operation in the case of confirming that the user has the demand of increasing the font, can more efficiently and simply adjust the font, and can improve the user perception.
[0087] According to the content of the above embodiment, the target prompt information is voice prompt information.
[0088] Correspondingly, the target prompt information is sent, including: controlling the voice system to generate and play the target prompt information.
[0089] Specifically, in the case that the electronic device is configured with a voice system, the target prompt information can be sent in the form of voice prompt information.
[0090] After it is determined that the number of the second target text is greater than the number threshold and the electronic device does not receive the first input of the user within the target period, the voice system can be controlled to generate and play the target prompt information in a plurality of ways, prompting the user of the electronic device whether the font of the first target text needs to be increased at present. For example, the voice system can be sent with request information indicating a request to generate and play the target prompt information, and the voice system can generate and play the target prompt information in response to the request information after receiving the request information.
[0091] Optionally, the second input of the user indicating that the font of the first target text needs to be increased in the embodiment of the present application can be voice input.
[0092] The embodiment of the present application can more accurately determine the user's demand, and can better prompt the user whether the font needs to be increased at present in some special scenarios, and can better improve the user perception.
[0093] According to the content of the above embodiment, the target prompt information is text prompt information.
[0094] Correspondingly, the target prompt information is sent, including: displaying the target prompt information on the display screen.
[0095] Specifically, whether the electronic device is configured with a voice system or not, the target prompt information can be sent in the form of text prompt information.
[0096] After determining that the quantity of the second target text is greater than the quantity threshold and the electronic device does not receive the first input of the user within the target period, the target prompt information can be displayed on the display screen to prompt the user of the electronic device whether the font of the first target text needs to be increased at present.
[0097] Optionally, the display manner of the target prompt information on the display screen can include, but is not limited to, a pop-up window, a bubble, and the like. The display manner of the target prompt information on the display screen is not limited in the embodiments of the present application.
[0098] Optionally, in the case that the electronic device is configured with a voice system, the target prompt information can be simultaneously issued in the form of voice prompt information and / or text prompt information.
[0099] The embodiments of the present application can more accurately determine the demand of the user, can more diversely prompt the user whether the font needs to be increased at present, and can better improve the user perception by displaying the text prompt information on the display screen based on the interaction between the user and the electronic device and the quantity of the second target text when the user has the demand of increasing the font.
[0100] Based on the content of the above embodiments, before determining the first target text with the actual size less than the size threshold as the second target text, the above method further includes: determining the size threshold based on the actual size of the system text.
[0101] Specifically, before the display screen of the electronic device displays the first target text, the user can set the font of the system text of the electronic device to a suitable size according to the actual demand. Before comparing the actual size of the first target text with the size threshold, the actual size of the system text can be obtained in various ways.
[0102] For example, in the case that the display screen of the electronic device displays the system text, the pixel points corresponding to at least one system text can be obtained. For each system text, the pixel value of each pixel point corresponding to the system text can be further determined as the target parameter corresponding to the system text, and the average value of the target parameters corresponding to the system text can be obtained as the target parameter corresponding to the system text currently set by the electronic device. Based on the actual size of the electronic device, the current resolution and the target parameter corresponding to the system text currently set by the electronic device, the actual size of the system text currently set by the electronic device can be obtained by the same numerical calculation method as that of obtaining the actual size of any first target text.
[0103] Specifically, after the actual size of the system text is acquired, the size threshold can be determined based on the actual size of the system text, for example, the actual size of the system text can be determined as the size threshold, or the actual size of the system text can be calculated (for example, 1.1 times of the actual size of the system text) and the calculation result is determined as the size threshold.
[0104] The embodiment of the application can provide a data basis for more accurate judgment of whether the user currently has a demand for increasing the font size by determining the size threshold based on the actual size of the system text currently set by the electronic device.
[0105] Based on the content of the above embodiment, in the case that the number of the second target text is greater than the number threshold and no first input of the user is received within the target period, before the font of the first target text is increased, the method further comprises: acquiring at least one sample time length; wherein the sample time length is a sample time length required for the sample electronic device to first receive a third input of a sample user since the sample electronic device displays the first target text on the display screen.
[0106] Specifically, the electronic device in a normal working state and capable of displaying the target interface on the display screen can be used as the sample electronic device. The number of the sample electronic devices can be one or more.
[0107] The user using the above sample electronic device can be one or more, and each of the users using the sample electronic device can be used as the sample user corresponding to the sample electronic device.
[0108] For each sample electronic device, when the sample electronic device is used by any corresponding sample user, the time when the sample electronic device starts to display the target interface on the display screen can be acquired as the starting time, the time when the sample electronic device first receives the third input of the sample user can be acquired as the ending time, and the sample time length corresponding to the sample user can be acquired based on the ending time and the starting time.
[0109] It should be noted that the third input of the sample user can be expressed as a touch output of the sample electronic device, and the touch output can include but is not limited to click input, sliding input, pressing input, etc. The third input of the sample user can also be expressed as a physical button input corresponding to the sample electronic device. The third input of the sample user can also be expressed as a voice input of the sample user.
[0110] It can be understood that each of the above-mentioned inputs is an exemplary enumeration, that is, the embodiment of the application includes but is not limited to each of the above-mentioned inputs. In actual implementation, the third input of the sample user can also include other any possible input, which can be specifically determined according to actual use requirements, and the embodiment of the application is not limited.
[0111] Based on the sample time length, the time length of the target period is obtained.
[0112] Specifically, after obtaining the at least one sample time length, numerical calculation can be performed based on the above sample time length, and the target period is determined based on the numerical calculation result. For example, the average value of the sample time length can be obtained by numerical calculation, and the time length of the target period is obtained, so that the target period can be determined. Alternatively, the dispersion degree of the sample time length can be analyzed, and after removing the discrete data, the average value of the remaining sample time length is obtained as the time length of the target period.
[0113] It should be noted that the more the number of sample time lengths in the embodiment of the application, the more the target period obtained conforms to the actual situation, so that the current demand of the user for increasing the font of the first target text can be more accurately determined.
[0114] Optionally, after obtaining the at least one sample time length, a sample time length set can be established, and the continuously obtained sample time length can be added to the above sample time length set, and the above sample time length set can be updated in real time, so that the target period can be more accurately obtained based on the continuously updated sample time length set.
[0115] The embodiment of the application obtains the sample electronic device display screen displaying the target interface, and the sample electronic device receives the third input of the sample user for the first time, and the time length of the sample user's third input is obtained as the sample time length, and the time length of the target period is determined based on the at least one sample time length, which can provide a data basis for more accurately determining whether the user currently has a demand for increasing the font.
[0116] In order to facilitate the understanding of the font adjustment method provided by the application, the following will illustrate the font adjustment method provided by the application through an example. Figure 2 is the second flowchart of the font adjustment method provided by the application. As shown in Figure 2 After the electronic device display screen displays the target interface, it can be judged whether the number of the second target text in the target interface is greater than the number threshold.
[0117] If the number of the second target text in the target interface is greater than the number threshold, it can be judged whether the electronic device receives the first input of the user within the target period.
[0118] If the electronic device receives the first input of the user within the target period, a sample time length can be obtained based on the time when the electronic device receives the above first input, and the above sample time length can be added to the sample time length set, and the above sample time length set can be updated. The target period can also be updated based on the updated sample time length set.
[0119] If the electronic device does not receive the user's first input within the target time period, it can be determined whether the electronic device is equipped with a voice system.
[0120] If the electronic device is equipped with a voice system, the voice system can be controlled to generate and play target prompts in voice form and / or display target prompts in text form on the target interface.
[0121] If the electronic device is not equipped with a voice system, text-based target prompts can be displayed on the target interface.
[0122] After receiving a second input from the user indicating confirmation to increase the font size of the first target text, the electronic device can increase the font size of the first target text.
[0123] Figure 3 This is a structural schematic diagram of the font adjustment device provided by the present invention. The following is in conjunction with… Figure 3 The font adjustment device provided by this invention will be described below, and the font adjustment device described below can be referred to in correspondence with the font adjustment method provided by this invention described above. For example... Figure 3 As shown, the device includes a data acquisition module 301 and a font adjustment module 302.
[0124] The data acquisition module 301 is used to acquire the actual size of the first target text based on the actual size and current resolution of the display screen, as well as the pixel value of each pixel corresponding to the first target text displayed on the display screen.
[0125] The font adjustment module 302 is used to adjust the font size of the first target text based on the actual size of the first target text.
[0126] Specifically, the data acquisition module 301 and the font adjustment module 302 are electrically connected.
[0127] The data acquisition module 301 can obtain the actual size of the first target text by numerical calculation based on the actual size of the electronic device's display screen, the current resolution of the electronic device's display screen, and the target parameters corresponding to the first target text.
[0128] It should be noted that the actual size of the first target text can include its area, for example, the area of the first target text could be 15 square millimeters. The area of the first target text can refer to the area of the box defined by the highest point, lowest point, leftmost point, and rightmost point of the first target text. The actual size of the first target text can also include its height and width, for example, the height * width of the first target text could be 5mm * 3mm. The height of the first target text can refer to the height of the aforementioned box, and the width of the first target text can refer to the width of the aforementioned box.
[0129] The font adjusting module 302 can determine whether the user currently has a demand for adjusting the font size of the first target text based on the actual size of the first target text displayed on the display screen, and can adjust the font size of the first target text according to the current demand of the user.
[0130] The font adjusting module 302 can adjust the font size of the first target text in various ways. For example, in the case where the first target text includes system text, the font size of the system text in the first target text can be adjusted by calling a control instruction for adjusting the font size of the system text in the background; or in the case where the first target text includes text in a third-party application, the font size of the text in the third-party application in the first target text can be adjusted by calling a control instruction for adjusting the font size of the text in the third-party application in the background; or in the case where the first target text includes text in a picture, the font size of the text in the picture included in the first target text can be adjusted by calling a control instruction for enlarging the picture in the background.
[0131] Optionally, the font adjusting module 302 can also be configured to determine the first target text with an actual size smaller than the size threshold as a second target text, and adjust the font size of the first target text based on the number of the second target text.
[0132] Optionally, the font adjusting module 302 can further include a font increasing sub-module.
[0133] The font increasing sub-module can be configured to increase the font of the first target text in the case where the number of the second target text is greater than the number threshold and no first input of the user is received within the target period.
[0134] The font adjusting module 302 can further include a demand confirming sub-module.
[0135] The demand confirming sub-module can be configured to issue a target prompt information, and increase the font of the first target text in the case where a second input of the user indicating confirmation of increasing the font of the first target text is received.
[0136] Optionally, the demand confirming sub-module can further include a prompting unit.
[0137] The prompting unit can be configured to control the voice system to generate and play the target prompt information.
[0138] The prompting unit can also be configured to display the target prompt information on the display screen.
[0139] Optionally, the font adjusting apparatus can further include a first threshold determining module and a second threshold determining module.
[0140] The first threshold value determining module can be used for determining the size threshold value based on the actual size of the system text.
[0141] The second threshold value determining module can be used for obtaining at least one sample time length, and obtaining the time length of the target period based on the sample time length, wherein the sample time length is the time length required for the sample electronic device to first receive the third input of the sample user since the sample electronic device display screen displays the first target text.
[0142] The embodiment of the present application can obtain the actual size of the first target text based on the actual size and the current resolution of the display screen and the pixel value of each pixel point corresponding to the first target text displayed on the display screen, and adjust the font of the first target text based on the actual size of the first target text, so as to judge whether the user has the demand of adjusting the font size based on the actual size of the first target text, and increase the font without the user's complicated operation in the case that the user has the demand of adjusting the font size, so as to more efficiently and simply adjust the font and improve the user perception.
[0143] Figure 4 An example of an electronic device entity structure schematic diagram is shown in Figure 4 As shown, the electronic device can include a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 complete mutual communication through the communication bus 440. The processor 410 can call the logical instructions in the memory 430 to execute the font adjustment method, which includes: obtaining the actual size of the first target text based on the actual size and the current resolution of the display screen and the pixel value of each pixel point corresponding to the first target text displayed on the display screen; and adjusting the font size of the first target text based on the actual size of the first target text.
[0144] In addition, the logic instructions in the memory 430 described above can be implemented in the form of a software function unit and sold or used as an independent product, and can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0145] In another aspect, the present application also provides a computer program product, which comprises a computer program, the computer program can be stored on a non-transitory computer readable storage medium, and the computer program is executed by a processor, so that the computer can execute the font adjustment method provided by the above method. The method comprises: based on the actual size and the current resolution of the display screen, and the pixel value of each pixel point corresponding to the first target text displayed on the display screen, obtaining the actual size of the first target text; and based on the actual size of the first target text, adjusting the font size of the first target text.
[0146] In another aspect, the present application also provides a computer program product, which comprises a computer program, the computer program can be stored on a non-transitory computer readable storage medium, and the computer program is executed by a processor, so that the computer can execute the font adjustment method provided by the above method. The method comprises: based on the actual size and the current resolution of the display screen, and the pixel value of each pixel point corresponding to the first target text displayed on the display screen, obtaining the actual size of the first target text; and based on the actual size of the first target text, adjusting the font size of the first target text.
[0147] The device embodiments described above are only schematic, wherein the units illustrated as separate components can or can not be physically separated, and the components illustrated as units can or can not be physical units, that is, they can be located in one place, or distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the present embodiment according to actual needs. Those skilled in the art can understand and implement without creative labor.
[0148] Those skilled in the art can clearly understand the implementation of the embodiments by the description of the foregoing embodiments, which can be implemented by means of software and necessary universal hardware platforms, and of course, can also be implemented by hardware. Based on such understanding, the above technical solutions can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the method described in an embodiment or some parts of the embodiment.
[0149] Finally, it should be noted that: the above examples are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing examples, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing examples, or make equivalent replacement for some technical features thereof; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A font adjustment method, characterized in that, include: Based on the actual size and current resolution of the display screen, and the pixel value of each pixel corresponding to the first target text displayed on the display screen, the actual size of the first target text is obtained. The first target text includes all the text in the target interface. The target interface is determined based on the content displayed on the interface and the functional characteristics of the interface. Based on the actual size of the first target text, the font size of the first target text is adjusted; The step of adjusting the font size of the first target text based on its actual size includes: determining the first target text whose actual size is less than a size threshold as the second target text; and adjusting the font size of the first target text based on the number of the second target texts. The actual size of the first target text is its height and width, and the size threshold includes a height threshold and a width threshold. The adjustment of the font size of the first target text based on the number of the second target text includes: If the height of any first target text is less than the height threshold and the width is less than the width threshold, then the first target text is determined as the second target text; After obtaining the number of second target texts displayed on the screen, based on the number of second target texts, determine whether the user currently needs to adjust the font size of the first target text, and adjust the font size of the first target text according to the user's current needs; If the number of the second target text exceeds the quantity threshold and no user input is received within the target time period, increase the font size of the first target text.
2. The font adjustment method according to claim 1, characterized in that, Increasing the font size of the first target text includes: Send target notification message; Upon receiving a second input from the user confirming an increase in the font size of the first target text, the font size of the first target text is increased.
3. The font adjustment method according to claim 2, characterized in that, The target prompt information is a voice prompt information; Accordingly, the issuance of the target prompt information includes: The voice system is controlled to generate and play the target prompt information.
4. The font adjustment method according to claim 2, characterized in that, The target prompt information is a text prompt information; Accordingly, the issuance of the target prompt information includes: The target prompt information is displayed on the display screen.
5. The font adjustment method according to any one of claims 1 to 4, characterized in that, Before determining the first target text whose actual size is smaller than the size threshold as the second target text, the method further includes: The size threshold is determined based on the actual size of the system text.
6. The font adjustment method according to any one of claims 1 to 4, characterized in that, Before increasing the font size of the first target text when the number of the second target text exceeds a threshold and no user input is received within the target time period, the method further includes: The duration for obtaining at least one sample; Based on the sample duration, the duration of the target time period is obtained; The sample duration is the time required for the sample electronic device to receive the third input from the sample user for the first time, starting from the time the first target text is displayed on the screen of the sample electronic device.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the font adjustment method as described in any one of claims 1 to 6.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the font adjustment method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Method for displaying image based on text in image and system
CN101419661A
Drug description information display method, device and terminal
CN109213558A