Method and device for setting font
By detecting the lens degree in the terminal and automatically setting the font size, the time-consuming and laborious problem of myopia or hyperopia users setting the font size is solved, and fast and convenient font settings are achieved, improving the operation efficiency of the elderly.
Patent Information
- Application Number
- CN201911117971.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-11-15
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2039-11-15
AI Technical Summary
Myopia or hyperopia users need to manually set the font size of the terminal, which is time-consuming and labor-intensive. Especially the elderly do not understand the terminal system setting method and lack convenient solutions.
By detecting the lens degree in the target area of the terminal and automatically setting the font size of the terminal according to the pre-stored relationship between the degree and the font size, a method and device for setting fonts is provided, including a detection unit, a determination unit and a setting unit, to achieve rapid set up.
Help myopia or hypersighted users quickly and conveniently set the font size of the terminal, improving operational efficiency, especially for the elderly, reducing the need to rely on others to help.
Smart Images

Figure CN112818636B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electronic information processing, and in particular to a method and device for setting fonts. Background Art
[0002] Currently, for myopic or hyperopic users, the font size of the terminal needs to be set manually, which is time-consuming, labor-intensive and inefficient. Especially for the elderly, who do not understand the terminal system setting methods such as mobile phones, they need to ask their children to help them complete it, which is inconvenient.
[0003] To address the above problems, no effective solution has been proposed yet. Summary of the invention
[0004] An embodiment of the present invention provides a method for setting fonts, so as to help a myopic or hyperopic user quickly set the font of a terminal, and the method includes:
[0005] Detect the lens in the target area of the terminal to obtain the degree of the lens in the target area;
[0006] Determine the font size corresponding to the degree of the lens in the target area according to the degree of the lens in the target area and the pre-stored relationship between the degree and the font size;
[0007] The font size of the terminal is set to the font size corresponding to the degree of the lens in the target area.
[0008] The embodiment of the present invention further provides a device for setting fonts, which is used to help myopic or hyperopic users quickly set the fonts of terminals. The device includes:
[0009] A detection unit, used to detect the lens located in the target area of the terminal to obtain the degree of the lens in the target area;
[0010] A determination unit, configured to determine the font size corresponding to the degree of the lens in the target area according to the degree of the lens in the target area and a pre-stored relationship between the degree and the font size;
[0011] The setting unit is used to set the font size of the terminal to the font size corresponding to the degree of the lens in the target area.
[0012] An embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned method for setting fonts when executing the computer program.
[0013] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for executing the above-mentioned method for setting a font.
[0014] The technical solution provided by the embodiment of the present invention is achieved by: detecting the lenses located in the target area of the terminal to obtain the degree of the lenses in the target area; determining the font size corresponding to the degree of the lenses in the target area according to the degree of the lenses in the target area and the relationship between the degree and the font size stored in advance; setting the font size of the terminal to the font size corresponding to the degree of the lenses in the target area, thereby helping myopic or hyperopic users to quickly set the font of the terminal. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0016] Figure 1 is a flow chart of a method for setting fonts in an embodiment of the present invention;
[0017] Figure 2 is a schematic diagram of the principle of setting fonts in an embodiment of the present invention;
[0018] Figure 3 is a schematic diagram of a lens scanning scene in an embodiment of the present invention;
[0019] Figure 4 is a schematic diagram of the refractive plane of the lens in an embodiment of the present invention;
[0020] Figure 5 is a schematic top view of the refraction of the lens in an embodiment of the present invention;
[0021] Figure 6 This is a schematic diagram showing the correspondence between the lens diopter and the font size in an embodiment of the present invention;
[0022] Figure 7 Schematic diagram of the structure of the device for setting fonts in an embodiment of the present invention. DETAILED DESCRIPTION
[0023] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0024] Figure 1 is a flow chart of a method for setting fonts in an embodiment of the present invention. Figure 1As shown, the method can be applied to a terminal and may include the following steps:
[0025] Step 101: Detect the lens in the target area of the terminal to obtain the degree of the lens in the target area;
[0026] Step 102: Determine the font size corresponding to the degree of the lens in the target area according to the degree of the lens in the target area and the pre-stored relationship between the degree and the font size;
[0027] Step 103: Setting the font size of the terminal to the font size corresponding to the degree of the lens in the target area.
[0028] The technical solution provided by the embodiment of the present invention is achieved by: detecting the lenses located in the target area of the terminal to obtain the degree of the lenses in the target area; determining the font size corresponding to the degree of the lenses in the target area according to the degree of the lenses in the target area and the relationship between the degree and the font size stored in advance; setting the font size of the terminal to the font size corresponding to the degree of the lenses in the target area, thereby helping myopic or hyperopic users to quickly set the font of the terminal.
[0029] Next, combine Figures 2 to 6 , the solution provided by the embodiment of the present invention is introduced in detail as follows.
[0030] 1. First, the above step 101 is introduced.
[0031] The inventors have found that the existing solutions for determining the power of lenses are inconvenient and inefficient. For example, the solution for determining the power of lenses based on the measurement principle of a focal meter in an optical shop has many steps that require manual participation, such as adjusting the distance between the lens and the focal meter observation point, which reduces the convenience of operation. In consideration of this technical problem, the inventors have proposed a solution for conveniently and quickly detecting the power of lenses, as provided in the following embodiments.
[0032] In one embodiment, detecting the lens located in the target area of the terminal to obtain the degree of the lens in the target area may include:
[0033] Controlling the ray scanning device to scan the lens located in the terminal target area;
[0034] Acquire the light spot position information after the scanning rays collected by a photosensitive plate pass through the lens and are refracted;
[0035] The degree of the lens in the target area is obtained according to the collected light spot position information and the relationship between the light spot position information and the lens degree stored in advance.
[0036] In a specific implementation, the step of "controlling the ray scanning device to scan the lens located in the terminal target area" can be performed by Figure 2 The step of "obtaining the light spot position information after the scanning rays collected by a photosensitive plate pass through the lens and are refracted" can be implemented by the acquisition module mentioned in the following embodiment, which can be specifically realized by Figure 2 The step of "obtaining the degree of the lens in the target area according to the collected light spot position information and the relationship between the pre-stored light spot position information and the lens degree" can be performed by Figure 2 The above lens power determination method is convenient and efficient.
[0037] In one embodiment, the light spot position information may include: first light spot position information and second light spot position information;
[0038] According to the collected light spot position information and the relationship between the light spot position information and the lens power stored in advance, the power of the lens in the target area is obtained, which may include:
[0039] Determine a lens power set corresponding to the first light spot position information according to the first light spot position information and a pre-stored relationship between the light spot position information and the lens power;
[0040] Determine a lens power set corresponding to the second light spot position information according to the second light spot position information and a pre-stored relationship between the light spot position information and the lens power;
[0041] The power of the lens in the target area is determined according to the intersection of the lens power set corresponding to the first light spot position information and the lens power set corresponding to the second light spot position information.
[0042] In specific implementation, the above solution of determining the degree of the lens based on the light spot position information is convenient and efficient.
[0043] Combine the following Figures 2 to 5 , an example is given to illustrate how to automatically detect the degree of the lens.
[0044] In specific implementation, the glasses are fixed with a glasses fixing frame. After the light passes through the lens and is refracted, the light spots hitting the photosensitive area of the photosensitive base are recorded. The refraction angles of regions with different thicknesses are different. Therefore, for lenses with different degrees, the collection and landing points of the light spots collected by the base after refraction are also different. The photosensitive base can use a coding format similar to a QR code or QR code to store the position information of the light spots, and the final light spot position information is compared with the light spot position information library in the database, that is, the obtained light spot position information can be input into the pre-stored relationship between the light spot position information and the lens degree to match and search, and obtain the degree corresponding to the obtained light spot position information.
[0045] Specifically, each light spot position information may have a degree attribute, and the attribute table is shown in Table 1 below. The attribute table is a form of the relationship between the light spot position information and the lens degree. The relationship may also be in other forms, such as a model chart form, etc. When determining the degree, for example, point A1 is included in the four degrees of 100 degrees, 150 degrees, 200 degrees, and 250 degrees, point B1 is included in the three degrees of 100 degrees, 150 degrees, and 200 degrees, and point C1 is included in the two degrees of 150 degrees and 250 degrees. If the position data obtained after scanning lens 1 includes point A1 and point B1, the degree of lens 1 should be the intersection of the corresponding degrees of point A1 and point B1, that is, it may be one of 100 degrees, 150 degrees, and 200 degrees. If the position data obtained after scanning lens 2 includes point B1 and point C1, the degree of lens 2 should be the intersection of the corresponding degrees of point B1 and point C1, that is, 150 degrees. Compared with traditional code comparison or pattern comparison, this comparison method can also shorten the comparison time.
[0046] Table 1: Refraction point attribute table
[0047] A1 100 degrees, 150 degrees, 200 degrees, 250 degrees B1 100 degrees, 150 degrees, 200 degrees C1 150 degrees, 250 degrees …… ……
[0048] And so on, for example, the maximum record is in row ZZ and column 1000 (800 degrees, 850 degrees, 900 degrees, 950 degrees, 1000 degrees).
[0049] In specific implementation, the schematic diagram of the lens scanning scene is as follows Figure 3 As shown; the schematic diagram of the lens refraction plane is as follows Figure 4 As shown, the scanning ray passes through the lens and hits the photosensitive plate. The thickness of the lens will affect the refraction angle of the ray. The top view of the lens refraction is shown in Figure 5 As shown, the photosensitive plate is marked with two-dimensional position information (row, column) on the horizontal and vertical axes, recorded as An. The refracted rays will hit the area on the photosensitive plate, that is, Figure 5The elliptical area in the middle, each square position represents a refraction point. The same refraction point may exist in the refraction area of lenses of different thicknesses. The points contained in the area formed by lenses of different powers have overlapping parts and non-overlapping parts.
[0050] During specific implementation, the target area may be a scanning area of the terminal.
[0051] In one embodiment, the ray scanning device may be an infrared scanning device, a laser scanning device or a red light scanning device.
[0052] In one embodiment, the terminal may be a mobile phone, a computer, an IPAD or a precision instrument.
[0053] 2. Next, the above step 102 is introduced.
[0054] The inventors also found that: when setting the font of the terminal system, there are only two or three fixed font sizes, which cannot fully meet the font size required by myopic or hyperopic users. Therefore, the following solution for adjusting the font of the terminal system is proposed.
[0055] In a specific implementation, the relationship between the pre-stored degree and the font size can be Figure 6 The table shown (the correspondence table between lens power and font size) is flexible in setting, and multiple lens power corresponding font sizes can be set, for example, 6 or more lens power corresponding font sizes can be set.
[0056] In a specific implementation, the step of "determining the font size corresponding to the degree of the lens in the target area according to the degree of the lens in the target area and the pre-stored relationship between the degree and the font size" can be performed by Figure 2 The comparison degree and font size function module (ie, the determination unit 02 mentioned in the following embodiment) is used to implement it.
[0057] 3. Next, the above step 103 is introduced.
[0058] In a specific implementation, the step of "setting the font size of the terminal to the font size corresponding to the degree of the lens in the target area" can be performed by Figure 2 The automatic font size adjustment function module (ie, the setting unit 03 described in the following embodiment) is used to achieve this. The terminal system may be an Android or IOS system, and the Android or IOS system font is adjusted to a size suitable for the current user.
[0059] In specific implementation, of course, the embodiment of the present invention can also set the font color, font type, etc. according to the automatically detected lens degree, and can also detect the contact lens degree, and quickly and conveniently set the font according to the detected contact lens degree.
[0060] Based on the same inventive concept, an apparatus for setting fonts is also provided in an embodiment of the present invention, as described in the following embodiments. Since the principle of solving the problem by the apparatus for setting fonts is similar to that of the method for setting fonts, the implementation of the apparatus for setting fonts can refer to the implementation of the method for setting fonts, and the repeated parts will not be repeated. As used below, the term "unit" or "module" can be a combination of software and / or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.
[0061] Figure 7 is a schematic diagram of the structure of the device for setting fonts in an embodiment of the present invention. Figure 7 As shown, the device comprises:
[0062] The detection unit 01 is used to detect the lens located in the target area of the terminal to obtain the degree of the lens in the target area;
[0063] The determination unit 02 is used to determine the font size corresponding to the degree of the lens in the target area according to the degree of the lens in the target area and the pre-stored relationship between the degree and the font size;
[0064] The setting unit 03 is used to set the font size of the terminal to the font size corresponding to the degree of the lens in the target area.
[0065] In one embodiment, the detection unit may include:
[0066] A control module, used for controlling the ray scanning device to scan the lens located in the terminal target area;
[0067] An acquisition module, used for acquiring the light spot position information after the scanning rays collected by a photosensitive plate pass through the lens and are refracted;
[0068] The power determination module is used to obtain the power of the lens in the target area according to the collected light spot position information and the relationship between the light spot position information and the lens power stored in advance.
[0069] In one embodiment, the light spot position information may include: first light spot position information and second light spot position information;
[0070] The degree determination module can be specifically used for:
[0071] Determine a lens power set corresponding to the first light spot position information according to the first light spot position information and a pre-stored relationship between the light spot position information and the lens power;
[0072] Determine a lens power set corresponding to the second light spot position information according to the second light spot position information and a pre-stored relationship between the light spot position information and the lens power;
[0073] The power of the lens in the target area is determined according to the intersection of the lens power set corresponding to the first light spot position information and the lens power set corresponding to the second light spot position information.
[0074] An embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned method for setting fonts when executing the computer program.
[0075] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for executing the above-mentioned method for setting a font.
[0076] The beneficial technical effect of the technical solution provided by the embodiment of the present invention is to help myopic or hyperopic users to change the system font to an appropriate size conveniently and quickly.
[0077] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention 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.
[0078] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks 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 produce 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.
[0079] 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 including an instruction device, which implements the process Figure 1A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0080] 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.
[0081] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the embodiments of the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for setting fonts, It is characterized in that include: Detecting the lens located in the target area of the terminal to obtain the degree of the lens in the target area, which includes: controlling a ray scanning device to scan the lens located in the target area of the terminal; the ray scanning device is integrated in the terminal, and the target area is the scanning area of the terminal; obtaining the light spot position information after the scanning ray collected by a photosensitive plate passes through the lens and is refracted; the light spot position information includes: first light spot position information and second light spot position information; according to the first light spot position information and the relationship between the light spot position information and the lens degree stored in advance, determining the lens degree set corresponding to the first light spot position information; according to the second light spot position information and the relationship between the light spot position information and the lens degree stored in advance, determining the lens degree set corresponding to the second light spot position information; according to the intersection of the lens degree set corresponding to the first light spot position information and the lens degree set corresponding to the second light spot position information, determining the degree of the lens in the target area; Determine the font size corresponding to the degree of the lens in the target area according to the degree of the lens in the target area and the pre-stored relationship between the degree and the font size; The font size of the terminal is set to the font size corresponding to the degree of the lens in the target area; or, according to the degree of the lens in the target area, the color and font type of the font are set, the degree of the contact lens is detected, and the font is quickly and conveniently set according to the detected degree of the contact lens.
2. The method for setting fonts according to claim 1, It is characterized in that The ray scanning device is an infrared scanning device, a laser scanning device or a red light scanning device.
3. The method for setting fonts according to claim 1, It is characterized in that The terminal is a mobile phone, a computer, an IPAD or a precision instrument.
4. A device for setting fonts, It is characterized in that include: A detection unit, for detecting a lens located in a target area of a terminal to obtain the degree of the lens in the target area, comprising: controlling a ray scanning device to scan the lens located in the target area of the terminal; the ray scanning device is integrated in the terminal, and the target area is a scanning area of the terminal; obtaining light spot position information of a scanning ray collected by a photosensitive plate after passing through the lens and being refracted; the light spot position information comprises: first light spot position information and second light spot position information; according to the first light spot position information and a pre-stored relationship between the light spot position information and the lens degree, determining a lens degree set corresponding to the first light spot position information; according to the second light spot position information and a pre-stored relationship between the light spot position information and the lens degree, determining a lens degree set corresponding to the second light spot position information; according to an intersection of the lens degree set corresponding to the first light spot position information and the lens degree set corresponding to the second light spot position information, determining the degree of the lens in the target area; A determination unit, configured to determine the font size corresponding to the degree of the lens in the target area according to the degree of the lens in the target area and a pre-stored relationship between the degree and the font size; The setting unit is used to set the font size of the terminal to the font size corresponding to the degree of the lens in the target area; or, according to the degree of the lens in the target area, set the color and font type of the font, detect the degree of the contact lens, and quickly and conveniently set the font according to the detected degree of the contact lens.
5. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the method according to any one of claims 1 to 3 is implemented.
6. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program for executing the method according to any one of claims 1 to 3.
