Font processing method and device of display device, display device and program product

CN122551682APending Publication Date: 2026-08-11HISENSE VISUAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-15
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0004]有鉴于此,本申请实施例提供了一种显示设备的字体处理方法、装置、显示设备及程序产品,以解决现有技术中控制显示设备显示目标字体时,显示设备上的目标字体会发生抖动现象的技术问题

Benefits of technology

在本申请实施例提供设备的显示设备的字体处理方法中,首先响应于针对初始字体的目标指令,读取初始字体对应的初始矢量字形轮廓,并根据初始矢量字形轮廓和目标指令,获取目标字体的目标矢量字形轮廓;目标指令用于对初始字体进行移动处理或放大处理,之后根据目标矢量字形轮廓,获取显示设备中的像素各自对应的第一字形覆盖率;第一字形覆盖率用于描述像素被目标矢量字形轮廓覆盖的面积比例,然后针对像素,根据显示设备的子像素排列参数和像素的第一字形覆盖率,获取像素中的各个子像素各自对应的第二字形覆盖率;第二字形覆盖率用于描述像素中的任意子像素被目标矢量字形轮廓覆盖的面积比例;子像素排列参数用于描述显示设备中的像素中的子像素的排列特征,最后根据像素中的各个子像素各自对应的第二字形覆盖率,控制显示设备显示目标字体。本申请根据每个像素中的各个子像素各自对应的字形覆盖率控制显示设备,相较于现有技术中以完整像素为单位对目标字体进行显示控制的方法,本申请能够提高显示控制精度,进而避免了显示设备上的目标字体会发生抖动现象。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122551682A_ABST
    Figure CN122551682A_ABST
Patent Text Reader

Abstract

This application relates to the field of display device technology, and provides a font processing method, apparatus, display device, and program product for a display device. The method includes: responding to a target instruction for an initial font, reading the initial vector glyph outline corresponding to the initial font; obtaining the target vector glyph outline of the target font based on the initial vector glyph outline and the target instruction; obtaining the first glyph coverage rate corresponding to each pixel in the display device based on the target vector glyph outline; for each pixel, obtaining the second glyph coverage rate corresponding to each sub-pixel in the pixel based on the sub-pixel arrangement parameters of the display device and the first glyph coverage rate of the pixel; and controlling the display device to display the target font based on the second glyph coverage rate corresponding to each sub-pixel in the pixel. This method controls the display device based on the glyph coverage rate of each sub-pixel in the pixel, improving display control accuracy and avoiding jitter in the target font of the display device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of display device technology, and in particular relates to a font processing method, apparatus, display device and program product for a display device. Background Technology

[0002] In the font rendering process of display devices, when performing adjustment operations such as moving or enlarging the initial font, existing technologies generally adopt a processing method based on whole pixels. Specifically, the display device first obtains the position of the adjusted target font in the display device's pixel grid, then calculates the proportion of the area covered by the target vector glyph outline of each whole pixel, i.e., the glyph coverage rate, and performs display control based on the glyph coverage rate.

[0003] However, since the physical pixels of a display device are composed of multiple sub-pixels (e.g., red, green, and blue sub-pixels) arranged in a specific manner, existing methods only calculate coverage on a per-pixel basis. This coarse-grained processing results in an inability to accurately represent the actual coverage of sub-pixels when the font outline edges intersect with pixel boundaries. For example, when the font is moved or scaled slightly, the positional changes of the outline edges on the pixel grid cannot be fully captured by the whole pixel unit, thus creating visual discontinuities during continuous adjustments. This discontinuity ultimately leads to font jitter. Summary of the Invention

[0004] In view of this, embodiments of this application provide a font processing method, apparatus, display device, and program product for a display device, to solve the technical problem in the prior art where the target font on the display device jitters when controlling the display device to display the target font. In a first aspect, embodiments of this application provide a font processing method for a display device, including: In response to a target instruction for an initial font, the initial vector glyph outline corresponding to the initial font is read, and the target vector glyph outline of the target font is obtained based on the initial vector glyph outline and the target instruction; the target instruction is used to perform movement processing or enlargement processing on the initial font. Based on the target vector glyph outline, obtain the first glyph coverage rate corresponding to each pixel in the display device; the first glyph coverage rate is used to describe the proportion of the area of ​​the pixel covered by the target vector glyph outline; For the pixel, based on the sub-pixel arrangement parameters of the display device and the first glyph coverage rate of the pixel, a second glyph coverage rate corresponding to each sub-pixel in the pixel is obtained; the second glyph coverage rate is used to describe the area ratio of any sub-pixel in the pixel covered by the target vector glyph outline; the sub-pixel arrangement parameters are used to describe the arrangement characteristics of the sub-pixels in the pixel of the display device; The display device is controlled to display the target font based on the coverage rate of the second glyph corresponding to each sub-pixel in the pixel.

[0005] Optionally, the sub-pixel arrangement parameters include the sub-pixel arrangement method and the sub-pixel arrangement distance; obtaining the second glyph coverage rate corresponding to each sub-pixel in the pixel based on the sub-pixel arrangement parameters of the display device and the first glyph coverage rate of the pixel includes: Obtain the pixel coordinate information of the pixel; Based on the sub-pixel arrangement and the pixel coordinate information, obtain the sub-pixel coordinate information corresponding to each sub-pixel in the pixel; Based on the sub-pixel coordinate information corresponding to each sub-pixel in the pixel, the first glyph coverage of the pixel, and the sub-pixel arrangement distance, the second glyph coverage of each sub-pixel in the pixel is obtained.

[0006] Optionally, obtaining the second glyph coverage rate corresponding to each sub-pixel in the pixel based on the sub-pixel coordinate information corresponding to each sub-pixel in the pixel, the first glyph coverage rate of the pixel, and the sub-pixel arrangement distance includes: Based on the first glyph coverage of the pixel, determine the first offset between the pixel center and the target vector glyph outline; For a sub-pixel within the pixel, a second offset between the sub-pixel and the target vector glyph contour is obtained based on the sub-pixel coordinate information, the sub-pixel arrangement distance, and the first offset. Furthermore, the second glyph coverage rate corresponding to the sub-pixel is obtained based on the second offset and a preset mapping relationship. The preset mapping relationship describes the relationship between the offset and the glyph coverage rate.

[0007] Optionally, controlling the display device to display the target font based on the second glyph coverage rate corresponding to each sub-pixel in the pixel includes: Obtain the color information of the target font at each pixel; For the pixel, based on the second glyph coverage rate corresponding to each sub-pixel in the pixel, a first brightness value corresponding to each sub-pixel in the pixel is determined. Based on the color information of the target font on the pixel, a brightness correction coefficient corresponding to each sub-pixel in the pixel is obtained. Based on the first brightness value and the brightness correction coefficient corresponding to each sub-pixel in the pixel, a second brightness value corresponding to each sub-pixel in the pixel is obtained. Based on the second brightness value corresponding to each sub-pixel in the pixel, a third brightness value corresponding to the pixel is obtained. The display device is controlled to display the target font based on the third brightness value corresponding to each pixel.

[0008] Optionally, obtaining the brightness correction coefficient corresponding to each sub-pixel in the pixel based on the color information of the target font on the pixel includes: Identify whether the pixel corresponds to the edge portion of the target font; If the pixel is a pixel corresponding to the edge portion of the target font, then according to the color information of the pixel and the color information of the background of the edge portion of the target font, the brightness correction coefficient corresponding to each sub-pixel in the pixel is obtained respectively; If the pixel is not the pixel corresponding to the edge part of the target font, then the brightness correction coefficient corresponding to each sub-pixel in the pixel is obtained according to the color information of the pixel.

[0009] Optionally, obtaining the second brightness value corresponding to each sub-pixel in the pixel based on the first brightness value corresponding to each sub-pixel in the pixel and the brightness correction coefficient includes: For each sub-pixel in the pixel, the product of the first brightness value corresponding to the sub-pixel and the brightness correction coefficient corresponding to the sub-pixel is determined as the second brightness value corresponding to the sub-pixel.

[0010] Optionally, obtaining the third brightness value corresponding to the pixel based on the second brightness value corresponding to each sub-pixel in the pixel includes: Obtain the preset correction coefficients; For each sub-pixel in the pixel, the second brightness value of the sub-pixel is subjected to non-linear brightness transformation processing according to the correction coefficient to obtain the fourth brightness value of the sub-pixel after brightness transformation processing, and the fourth brightness value of the sub-pixel is subjected to normalization processing and / or color gamut limiting processing to obtain the fifth brightness value of the sub-pixel. Obtain the brightness weight value corresponding to each sub-pixel; The third brightness value corresponding to the pixel is determined based on the fifth brightness value and the brightness weight value corresponding to each sub-pixel in the pixel.

[0011] Optionally, controlling the display device to display the target font based on the third brightness value corresponding to each pixel includes: A font bitmap corresponding to the target font is generated based on the third brightness value corresponding to each pixel; the font bitmap includes several sub-font bitmaps, and each sub-font bitmap corresponds to a display module in the display device; For each of the display modules, a corresponding sub-font bitmap is sent to the display module to instruct the display module to display according to the corresponding sub-font bitmap.

[0012] Optionally, obtaining the target vector glyph outline of the target font based on the initial vector glyph outline and the target instruction includes: Calculate the initial vector glyph contour and the intermediate vector glyph contour corresponding to the target instruction; Obtain the pixel grid information of the display device, adjust the size of the intermediate vector glyph outline, and / or adjust the position of the intermediate vector glyph outline until the intermediate vector glyph outline is aligned with the pixel grid of the display device, and determine the adjusted intermediate vector glyph outline as the target vector glyph outline.

[0013] Secondly, embodiments of this application provide a font processing apparatus for a display device, comprising: The first acquisition unit is configured to, in response to a target instruction for the initial font, read the initial vector glyph outline corresponding to the initial font, and acquire the target vector glyph outline of the target font based on the initial vector glyph outline and the target instruction; the target instruction is used to perform movement processing or enlargement processing on the initial font. The second acquisition unit is used to acquire the first glyph coverage rate corresponding to each pixel in the display device based on the target vector glyph outline; the first glyph coverage rate is used to describe the proportion of the area of ​​the pixel covered by the target vector glyph outline; The third acquisition unit is configured to, for the pixel, acquire a second glyph coverage rate corresponding to each sub-pixel in the pixel based on the sub-pixel arrangement parameters of the display device and the first glyph coverage rate of the pixel; the second glyph coverage rate is used to describe the area ratio of any sub-pixel in the pixel covered by the target vector glyph outline; the sub-pixel arrangement parameters are used to describe the arrangement characteristics of the sub-pixels in the pixel in the display device; The control unit is configured to control the display device to display the target font based on the second glyph coverage rate corresponding to each sub-pixel in the pixel.

[0014] Thirdly, embodiments of this application provide a display device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the font processing method of the display device as described in any of the first aspects above.

[0015] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the font processing method for a display device as described in any of the first aspects above.

[0016] Fifthly, embodiments of this application provide a computer program product that, when run on a display device, causes the display device to perform the steps of the font processing method for the display device as described in any of the first aspects above.

[0017] The font processing method, apparatus, display device, and program product for a display device provided in this application have the following beneficial effects: In the font processing method of the display device provided in this application embodiment, firstly, in response to the target instruction for the initial font, the initial vector glyph outline corresponding to the initial font is read, and the target vector glyph outline of the target font is obtained according to the initial vector glyph outline and the target instruction; the target instruction is used to perform movement processing or enlargement processing on the initial font; then, according to the target vector glyph outline, the first glyph coverage rate corresponding to each pixel in the display device is obtained; the first glyph coverage rate is used to describe the area ratio of the pixel covered by the target vector glyph outline; then, for each pixel, according to the sub-pixel arrangement parameters of the display device and the first glyph coverage rate of the pixel, the second glyph coverage rate corresponding to each sub-pixel in the pixel is obtained; the second glyph coverage rate is used to describe the area ratio of any sub-pixel in the pixel covered by the target vector glyph outline; the sub-pixel arrangement parameters are used to describe the arrangement characteristics of the sub-pixels in the pixel in the display device; finally, according to the second glyph coverage rate corresponding to each sub-pixel in the pixel, the display device is controlled to display the target font. This application controls the display device based on the glyph coverage of each sub-pixel in each pixel. Compared with the prior art method of controlling the display of the target font on a unit of whole pixels, this application can improve the display control accuracy and thus avoid the target font from jittering on the display device. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 A flowchart illustrating the implementation of the font processing method for a display device provided in this application embodiment; Figure 2 A flowchart illustrating the implementation of a method for obtaining glyph coverage provided in this application embodiment; Figure 3 A flowchart illustrating the implementation of a method for obtaining glyph coverage, provided in another embodiment of this application; Figure 4 A flowchart illustrating the implementation of a method for controlling a display device according to an embodiment of this application; Figure 5 A schematic flowchart illustrating a method for obtaining brightness values ​​provided in an embodiment of this application; Figure 6 This application provides a schematic diagram of the structure of a font processing device for a display device. Figure 7 This is a schematic diagram of the structure of a display device provided in an embodiment of this application. Detailed Implementation

[0020] It should be noted that the terminology used in the embodiments of this application is only for explaining specific embodiments of this application and is not intended to limit this application. In the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more, "at least one" or "one or more" means one, two or more. The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.

[0021] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0022] The font processing method for display devices provided in this application can be executed by a display device, which includes, but is not limited to, electronic devices such as televisions, laser televisions, mobile phones, computers, and tablet computers. More specifically, the font processing method for display devices provided in this application can be executed by a controller in the display device.

[0023] The font processing method for display devices provided in this application embodiment can be applied to any scenario where the font of the display device needs to be processed. For example, when it is necessary to enlarge or move the initial font of the display device, the various steps of the font processing method for display devices provided in this application embodiment can be executed through the display device, thereby improving the control accuracy of the display and solving the technical problem that the target font on the display device will jitter when controlling the display device to display the target font.

[0024] Please see Figure 1 , Figure 1 This is a flowchart illustrating the implementation of a font processing method for a display device provided in an embodiment of this application. The font processing method for the display device may include steps S101 to S104, as detailed below: In S101, in response to the target instruction for the initial font, the initial vector glyph outline corresponding to the initial font is read, and the target vector glyph outline of the target font is obtained according to the initial vector glyph outline and the target instruction; the target instruction is used to move or enlarge the initial font.

[0025] In this embodiment of the application, the initial font refers to the original font that is preset on the display device or entered by the user before any processing is performed.

[0026] A target instruction is a command issued by the user or system to perform a specific operation on the initial font. These operations may include moving the font, i.e., changing its position on the display screen, or enlarging it, i.e., changing its size.

[0027] The initial vector glyph outline refers to the geometric shape of the initial font in vector graphic representation.

[0028] The target vector glyph outline refers to the glyph outline obtained after moving or enlarging the initial vector glyph outline according to the target instruction.

[0029] After receiving the target instruction for the initial font, the display device needs to read the initial vector glyph outline corresponding to that initial font and, based on the initial vector glyph outline and the target instruction, obtain the target vector glyph outline of the target font. This target instruction can be used to move or enlarge the initial font. For example, when the user selects to enlarge the font by a factor of one, the system will receive an enlargement instruction. At this time, the target vector glyph outline can be obtained in several ways. One way is to directly apply an affine transformation to the geometric data of the initial vector glyph outline, such as using matrix multiplication to achieve translation or scaling operations, thereby obtaining a new vector glyph outline. Another way is to utilize a font rendering engine, taking the initial vector glyph outline and the target instruction as input, processing them internally, and outputting the transformed target vector glyph outline.

[0030] In one possible implementation, the display device can obtain the target vector glyph outline of the target font based on the initial vector glyph outline and the target instruction in the following way: Calculate the initial vector glyph outline and the intermediate vector glyph outline corresponding to the target instruction; obtain the pixel grid information of the display device, adjust the glyph size of the intermediate vector glyph outline, and / or adjust the position of the intermediate vector glyph outline until the intermediate vector glyph outline is aligned with the pixel grid of the display device, and determine the adjusted intermediate vector glyph outline as the target vector glyph outline.

[0031] The calculation of the initial vector glyph outline and the intermediate vector glyph outline corresponding to the target instruction aims to perform a preliminary geometric transformation on the original vector glyph outline based on the target instruction input by the user or system (e.g., move, zoom, etc.), generating an intermediate glyph outline that is not yet aligned to the pixel grid. This intermediate vector glyph outline is the basis for subsequent pixel grid alignment. This step can be achieved by parsing the target instruction; if the instruction is a move operation, all control points and anchor points of the initial vector glyph outline are translated by the specified displacement; if the instruction is a zoom operation, all control points and anchor points of the initial vector glyph outline are scaled around the specified scaling center and scaling ratio.

[0032] Obtaining the pixel grid information of a display device refers to acquiring parameters such as the layout, size, and spacing of the physical pixels on the display device. This is the foundation for precise pixel alignment. Acquiring this information ensures that the adjustment of the character outlines accurately matches the actual physical pixels of the display device, thereby avoiding rendering distortion caused by mismatch between the character shape and the pixel grid.

[0033] The size of the intermediate vector glyph outline is adjusted, and / or its position is adjusted, until the outline aligns with the display device's pixel grid. This is the core pixel grid alignment operation, designed to eliminate sub-pixel-level deviations between the intermediate vector glyph outline and the display device's pixel grid. By fine-tuning the glyph size and / or position, the edges of the glyph outline are made to fall as close as possible to pixel boundaries or pixel centers, thereby improving the clarity and sharpness of the rendering.

[0034] In S102, the first glyph coverage rate corresponding to each pixel in the display device is obtained based on the target vector glyph outline; the first glyph coverage rate is used to describe the proportion of the area of ​​the pixel covered by the target vector glyph outline.

[0035] In this embodiment of the application, the first glyph coverage rate is a value between 0 and 1, where 0 indicates that the pixel is not covered at all, and 1 indicates that the pixel is completely covered.

[0036] After obtaining the target vector glyph outline, the display device can determine the first glyph coverage rate for each pixel in the display device based on the target vector glyph outline. This first glyph coverage rate describes the proportion of the area covered by the target vector glyph outline for any pixel. For example, a pixel might have 70% of its area covered by the glyph outline. To obtain this coverage rate, the target vector glyph outline can be rasterized, the geometric intersection area between each pixel region and the glyph outline can be calculated, and then the ratio of this intersection area to the total pixel area can be used as the first glyph coverage rate.

[0037] In S103, for a pixel, based on the sub-pixel arrangement parameters of the display device and the first glyph coverage of the pixel, the second glyph coverage of each sub-pixel in the pixel is obtained; the second glyph coverage is used to describe the proportion of the area covered by the target vector glyph outline of any sub-pixel in the pixel; the sub-pixel arrangement parameters are used to describe the arrangement characteristics of the sub-pixels in the pixels of the display device.

[0038] In this embodiment of the application, the second glyph coverage rate is a value between 0 and 1, where 0 indicates that the pixel is not covered at all, and 1 indicates that the pixel is completely covered.

[0039] After obtaining the first glyph coverage rate for each pixel, the display device can, for each pixel, obtain the second glyph coverage rate for each sub-pixel within that pixel, based on the display device's sub-pixel arrangement parameters and the first glyph coverage rate. For example, a pixel may contain three sub-pixels: red, green, and blue, and the proportions of their coverage by the glyph outline may differ.

[0040] To obtain the second glyph coverage, the precise position and size of each sub-pixel within the pixel can be determined based on the sub-pixel arrangement parameters. Then, for each sub-pixel, the geometric intersection area of ​​its region with the target vector glyph outline is calculated, and the ratio of this intersection area to the total area of ​​the sub-pixels is used as the second glyph coverage.

[0041] In one possible implementation, the subpixel arrangement parameters include the subpixel arrangement method and the subpixel arrangement distance, which the display device can achieve through methods such as... Figure 2 A corresponding embodiment provides a method for obtaining glyph coverage to determine the second glyph coverage corresponding to each sub-pixel in the pixel.

[0042] like Figure 2 As shown, Figure 2 This is a flowchart illustrating the implementation of a method for obtaining glyph coverage provided in an embodiment of this application. Figure 2 As shown, the method for obtaining the glyph coverage can include steps S201 to S203. Details are as follows: In S201, the pixel coordinate information of the pixel is obtained.

[0043] In this implementation, the pixel coordinate information refers to the unique identifier that determines each pixel in the display device within the entire display area, and is usually represented in the form of two-dimensional coordinates (e.g., (x, y)).

[0044] Pixel coordinate information can be dynamically generated or queried by the display device during the rendering process. Alternatively, it can be obtained through a pre-stored pixel mapping table, which records the physical position of each pixel on the display panel.

[0045] In S202, based on the sub-pixel arrangement and pixel coordinate information, the sub-pixel coordinate information corresponding to each sub-pixel in the pixel is obtained.

[0046] In this implementation, the subpixel arrangement can include horizontal or vertical subpixel arrangement. The display device can determine whether the subpixel arrangement is horizontal or vertical, and obtain the subpixel coordinate information corresponding to each subpixel in the pixel based on the pixel coordinate information.

[0047] Subpixel coordinates can be local coordinates relative to their parent pixel or global coordinates relative to the entire display area. The center or boundary coordinates of each subpixel can be determined geometrically (e.g., by adding or subtracting a preset offset) based on pixel coordinate information, subpixel arrangement, and subpixel spacing. Alternatively, a preset subpixel coordinate generation algorithm, combined with the display device's hardware characteristics, can be used to calculate the precise position of each subpixel in real time.

[0048] In S203, the second glyph coverage of each sub-pixel in the pixel is obtained based on the sub-pixel coordinate information corresponding to each sub-pixel in the pixel, the first glyph coverage of the pixel, and the sub-pixel arrangement distance.

[0049] In this implementation, it can be done through, as follows Figure 3 A corresponding embodiment provides a method for obtaining glyph coverage to obtain the second glyph coverage corresponding to each sub-pixel.

[0050] Figure 3 A flowchart illustrating the implementation of a method for obtaining glyph coverage, as provided in another embodiment of this application, is shown below. Figure 3 As shown, the method for obtaining the glyph coverage can include S301~S302, which are detailed below: In S301, the first offset between the pixel center and the target vector glyph outline is determined based on the first glyph coverage of the pixel.

[0051] In this implementation, based on the first glyph coverage rate of the pixel, a first offset between the pixel center and the target vector glyph outline is determined. The aim is to infer the relative position information of the target vector glyph outline within the pixel region through the pixel-level first glyph coverage rate. The first glyph coverage rate describes the proportion of the entire pixel covered by the glyph outline; this proportion can indirectly reflect the distance or relative position between the glyph outline and the pixel center. The first offset can be a two-dimensional vector representing the distance and direction from the pixel center to a specific point on the glyph outline (such as the nearest point or the outline center). In S302, for each sub-pixel in the pixel, the second offset between the sub-pixel and the target vector glyph contour is obtained based on the sub-pixel coordinate information, the sub-pixel arrangement distance and the first offset. The second glyph coverage of the sub-pixel is obtained based on the second offset and the preset mapping relationship. The preset mapping relationship is used to describe the relationship between the offset and the glyph coverage.

[0052] In this implementation, based on the known overall glyph outline offset information of the pixels (first offset), and combined with the precise position of the sub-pixel itself (sub-pixel coordinate information) and the spacing between sub-pixels (sub-pixel arrangement distance), the precise offset of each sub-pixel relative to the target vector glyph outline is calculated. The sub-pixel coordinate information is usually the relative coordinates with respect to the pixel center.

[0053] The subpixel arrangement distance defines the distribution pattern of subpixels within a pixel. By superimposing or combining the relative coordinates of the subpixels with the offset of the pixel center relative to the glyph outline, a second offset from the center point of each subpixel to the glyph outline can be obtained. Finally, a preset mapping relationship is obtained, and based on the second offset corresponding to the subpixel and the preset mapping relationship, the calculated second offset is converted into the second glyph coverage of the subpixel.

[0054] A preset mapping is a function or lookup table that describes the correspondence between the distance (offset) from the center of a subpixel to the glyph outline and the proportion of the subpixel area covered by the glyph outline. The preset mapping describes the relationship between the offset and glyph coverage, which is typically non-linear because the edges of the glyph outline are usually curved or slanted. This mapping can be a one-dimensional lookup table where the input is the offset and the output is the glyph coverage; or it can be a mathematical formula, such as a smooth transition function, capable of simulating the gradual transition of a subpixel from completely uncovered to fully covered.

[0055] The following is a specific example to illustrate this. After obtaining the target instruction for the initial font, the display device first reads the initial vector glyph outline corresponding to the initial font, and then obtains the target vector glyph outline of the target font according to the target instruction (e.g., move the font 5 pixels to the right, or enlarge it by 1.2 times).

[0056] Subsequently, based on the target vector glyph outline, the proportion of the area covered by the outline for each pixel in the display device is calculated, thereby obtaining the first glyph coverage rate for each pixel.

[0057] For a specific pixel, such as the pixel located at position (100, 50) on the display screen, its pixel coordinates are first obtained as (100, 50). Assume the subpixel arrangement parameters of the display device are set as follows: the subpixel arrangement method is "horizontal subpixel arrangement," and the subpixel spacing is 1 / 3 of the width of each subpixel. Based on the pixel coordinates (100, 50) and the "horizontal subpixel arrangement" subpixel arrangement method, the subpixel coordinates of the three subpixels (red, green, and blue) within this pixel can be determined. For example, the center coordinates of the red subpixel might be (100 + 1 / 6 pixel width, 50), the center coordinates of the green subpixel might be (100 + 1 / 2 pixel width, 50), and the center coordinates of the blue subpixel might be (100 + 5 / 6 pixel width, 50).

[0058] Next, using these sub-pixel coordinates, the first glyph coverage of the pixel, and the sub-pixel arrangement distance, the proportion of the area covered by the target vector glyph outline of each sub-pixel is precisely determined through geometric calculation or sampling judgment; this is the second glyph coverage. For example, if a red sub-pixel is mostly covered by the glyph outline, its second glyph coverage might be 0.8; if a green sub-pixel is only partially covered, its second glyph coverage might be 0.3; and if a blue sub-pixel is not covered, its second glyph coverage might be 0.

[0059] Finally, based on the coverage rate of the second glyph corresponding to each sub-pixel in each pixel, the display device is controlled to display the target font, thereby achieving fine sub-pixel-level font rendering.

[0060] In S104, the display device is controlled to display the target font based on the coverage rate of the second glyph corresponding to each sub-pixel in the pixel.

[0061] In this embodiment of the application, the display device can be configured as follows: Figure 4 The method for controlling a display device according to a corresponding embodiment controls the display device to display a target font.

[0062] Please see Figure 4 , Figure 4 A flowchart illustrating the implementation of a method for controlling a display device provided in this application embodiment is shown below. Figure 4 As shown, the method for controlling the display device may include S401~S403, as detailed below: In S401, the color information of the target font at each pixel is obtained.

[0063] In this implementation, the color information of the target font at each pixel is obtained, aiming to determine the color attributes that the target font should present at each pixel position on the display device. This color information can come from the font's own color definition, such as color attributes in the font file, or it can be based on color parameters set by the application or the user. This information can be obtained synchronously by the font rendering engine during glyph generation.

[0064] In S402, for a pixel, based on the second glyph coverage of each sub-pixel in the pixel, the first brightness value of each sub-pixel in the pixel is determined, and based on the color information of the target font on the pixel, the brightness correction coefficient of each sub-pixel in the pixel is obtained, and based on the first brightness value and the brightness correction coefficient of each sub-pixel in the pixel, the second brightness value of each sub-pixel in the pixel is obtained, and based on the second brightness value of each sub-pixel in the pixel, the third brightness value of the pixel is obtained.

[0065] In this implementation, a first brightness value is determined for each sub-pixel of the pixel based on its corresponding second glyph coverage rate. This first brightness value is used to convert the proportion of each sub-pixel covered by the target glyph outline into a preliminary brightness value. The first brightness value reflects the degree to which the sub-pixel is occupied by the glyph content; the higher the coverage rate, the greater its brightness contribution theoretically. The determination method can be a linear or non-linear mapping between the glyph coverage rate and a preset maximum brightness value. For example, a simple proportional relationship can be used, where the first brightness value equals the glyph coverage rate multiplied by the maximum brightness value; or a non-linear function such as gamma correction can be used for mapping to better conform to the visual perception characteristics of the human eye.

[0066] Based on the color information of the target font on that pixel, the brightness correction coefficient corresponding to each sub-pixel in that pixel is obtained. This brightness correction coefficient is a multiplicative or additive factor used to adjust the brightness of the sub-pixel, with the aim of making the brightness output of the sub-pixel more in line with the color requirements of the target font.

[0067] In one possible implementation, the brightness correction coefficients corresponding to each sub-pixel of the pixel can be obtained by: identifying whether the pixel is a pixel corresponding to the edge of the target font; if the pixel is a pixel corresponding to the edge of the target font, then obtaining the brightness correction coefficients corresponding to each sub-pixel of the pixel according to the color information of the pixel and the background color information of the edge of the target font; if the pixel is not a pixel corresponding to the edge of the target font, then obtaining the brightness correction coefficients corresponding to each sub-pixel of the pixel according to the color information of the pixel.

[0068] Determining whether a pixel corresponds to an edge portion of the target font aims to identify pixels located on the font outline boundary for special processing. One implementation involves analyzing the pixel's first glyph coverage. If the pixel's first glyph coverage is between 0 and 1 (excluding 0 and 1), it indicates that the pixel is covered by the font outline and is thus identified as an edge pixel. Another implementation involves comparing the pixel's glyph coverage or color information with that of its neighbors. If the pixel's glyph coverage differs significantly from that of at least one neighboring pixel, or if the pixel's color information differs significantly from that of its neighbors, then the pixel can be determined as an edge pixel.

[0069] When a pixel is identified as an edge pixel, its brightness correction coefficient needs to take into account both the font color and the background color. One implementation is that for each sub-pixel within an edge pixel, its brightness correction coefficient can be calculated by weighting the font color and background color based on the proportion of the sub-pixel covered by the font. For example, if a sub-pixel is 70% covered by the font, its brightness correction coefficient can be a weighted average of the 70% font color brightness contribution and the 30% background color brightness contribution.

[0070] When a pixel is determined to be a non-edge pixel (i.e., completely covered or not covered by the font), its brightness correction factor is mainly determined based on the color information of the font itself. For example, for a red sub-pixel, if the target font color at that location is red, the correction factor may be higher; if it is blue, the correction factor may be lower.

[0071] This application's solution achieves refined control of brightness correction coefficients during font display by introducing a determination of whether a pixel is at the edge of the target font. After obtaining the color information of the target font on each pixel, the system first classifies each pixel, distinguishing between pixels located at the font edge and non-edge pixels located inside or outside the font. For non-edge pixels, the brightness correction coefficient of its internal sub-pixels is directly determined based on the color information of the target font on that pixel, ensuring the color accuracy of the main body of the font. For edge pixels, since they are affected by both the font and the background, this solution calculates the brightness correction coefficient of each internal sub-pixel based on the color information of the pixel and the color information of the background of the target font's edge. This differentiated processing method allows the brightness of sub-pixels in the font edge area to transition more smoothly from the font color to the background color, effectively avoiding the jaggedness and unnaturalness caused by simple binarization or single-color processing. In this way, the acquisition of brightness correction coefficients is more in line with actual visual perception, providing more accurate input for subsequent brightness value calculations, thereby improving the overall smoothness and clarity of the font display.

[0072] In one possible implementation, the display device can obtain the second brightness value of each sub-pixel in the pixel based on the first brightness value and brightness correction coefficient of each sub-pixel in the pixel in the following way: for each sub-pixel in the pixel, the product of the first brightness value and the brightness correction coefficient of the sub-pixel is determined as the second brightness value of the sub-pixel.

[0073] The first brightness value represents the base brightness contribution determined by the proportion of the sub-pixel covered by the target vector glyph outline. Its function is to provide an initial brightness reference based on the glyph geometry.

[0074] The second brightness value is the final brightness value of the sub-pixel after brightness correction. Its function is to comprehensively reflect the degree to which the sub-pixel is covered by the font and the color information of the font, providing accurate brightness data for subsequent display control. This second brightness value will be directly used to control the luminous intensity of the corresponding sub-pixel in the display device.

[0075] The initial luminance value is mathematically multiplied by a luminance correction factor. This operation proportionally adjusts the base luminance, with the luminance correction factor acting as a scaling factor for the initial luminance value. For example, a luminance correction factor of 0.8 means the initial luminance value is reduced by 20%. This multiplicative relationship ensures that the effect of the luminance correction factor on luminance is linear, predictable, and directly reflects the contribution of color to luminance.

[0076] In one possible implementation, the display device can be via, for example... Figure 5 The brightness value acquisition method shown is to obtain the third brightness value corresponding to the pixel based on the second brightness value corresponding to each sub-pixel in the pixel.

[0077] Please see Figure 5 , Figure 5 This is a schematic flowchart illustrating a method for obtaining brightness values ​​provided in an embodiment of this application. Figure 5 As shown, the method for obtaining the brightness value may include S501~S504, which are detailed below: In S501, the preset correction coefficient is obtained.

[0078] In this implementation, the preset correction coefficients refer to a set of values ​​predetermined before font display processing, based on the inherent characteristics of the display device, the human visual perception model, or specific display effect requirements. These coefficients are used to adjust the brightness values ​​to compensate for the non-linear response of the display device, such as its gamma curve, or to adapt to ambient light conditions, thereby achieving a more accurate visual effect.

[0079] For example, the correction factor can be calculated by performing detailed gamma curve measurements on the display device, or designed based on the human eye's sensitivity to different brightness levels.

[0080] In S502, for each sub-pixel in the pixel, the second brightness value of the sub-pixel is subjected to non-linear brightness transformation processing according to the correction coefficient to obtain the fourth brightness value of the sub-pixel after brightness transformation processing, and the fourth brightness value of the sub-pixel is subjected to normalization processing and / or color gamut limiting processing to obtain the fifth brightness value of the sub-pixel.

[0081] In this implementation, nonlinear brightness transformation processing refers to mapping brightness values ​​through a nonlinear function to change their rate of change across different brightness ranges. The main purpose of this processing is to match the visual perception characteristics of the human eye or to correct the nonlinear response of the display device, making brightness changes more visually uniform or more in line with expectations. For example, nonlinear brightness transformation processing can be gamma correction.

[0082] Normalization refers to scaling brightness values ​​to a preset effective range (e.g., 0 to 1 or 0 to 255). This process ensures that brightness values ​​do not exceed the effective range during subsequent processing or display, and maintains the relative relationships between different brightness values.

[0083] Color gamut limiting refers to adjusting the brightness value to within the color range (color gamut) supported by the display device. This process aims to prevent the display device from displaying colors outside its capabilities, thereby avoiding color distortion or inaccuracy.

[0084] In S503, the brightness weight value corresponding to each sub-pixel is obtained.

[0085] In this implementation, the brightness weight value is a coefficient assigned to each sub-pixel within a pixel, representing the degree to which that sub-pixel contributes to the final brightness of the entire pixel. Considering the differences in spatial location, color type, or human visual perception among different sub-pixels, a weighted average method can more accurately calculate the overall brightness of the pixel. For example, the weight can be set based on the color type of the sub-pixel (such as red, green, or blue) and its proportion of brightness contribution in the human visual system, or based on the geometric position or arrangement of the sub-pixel in the pixel array.

[0086] In S504, the third brightness value of the pixel is determined based on the fifth brightness value and brightness weight value corresponding to each sub-pixel in the pixel.

[0087] In this implementation, after determining the fifth brightness value and brightness weight value corresponding to each sub-pixel in the pixel, the third brightness value corresponding to the pixel can be determined by weighted summation.

[0088] The proposed solution, after obtaining the second brightness value corresponding to each sub-pixel within each pixel, first introduces a preset correction coefficient and performs non-linear brightness transformation processing on these second brightness values. This step aims to compensate for the non-linear response characteristics of the display device, such as the gamma curve, so that the processed brightness value (fourth brightness value) can more accurately reflect the human eye's perception of brightness, thereby avoiding visual distortion caused by the inherent characteristics of the device. Subsequently, these fourth brightness values ​​are normalized and / or color gamut limiting processed to obtain the fifth brightness value. Normalization ensures that the brightness value is within an acceptable display range, avoiding overflow or underload, while color gamut limiting adjusts the brightness value to the actual displayable color gamut of the display device, preventing color distortion and ensuring color accuracy. Finally, considering that the contribution of different sub-pixels within a pixel to the overall brightness may differ, this solution further obtains the brightness weight value corresponding to each sub-pixel. These weight values ​​can be preset according to factors such as the color type, spatial position, or human visual sensitivity of the sub-pixel. By weighted summing the fifth brightness value of each sub-pixel with its corresponding brightness weight value, the third brightness value corresponding to that pixel is finally determined. This weighted processing can more precisely simulate the human eye's perception of the overall brightness of a pixel, thereby achieving a more accurate and natural brightness representation at the pixel level.

[0089] In S403, the display device is controlled to display the target font based on the third brightness value corresponding to each pixel.

[0090] In this implementation, the display device can control the display of the target font based on the third brightness value corresponding to each pixel in the following way: Based on the third brightness value corresponding to each pixel, a font bitmap corresponding to the target font is generated; the font bitmap includes several sub-font bitmaps, each sub-font bitmap corresponding to a display module in a display device; for each display module, the corresponding sub-font bitmap is sent to the display module to instruct the display module to display according to the corresponding sub-font bitmap.

[0091] The generation of the font bitmap corresponding to the target font refers to a data structure that stores font graphic information in the form of a pixel array. It is usually composed of a series of pixels, each carrying color or brightness information, which together constitute the visual representation of the font.

[0092] The process of generating a font bitmap involves converting abstract font outline information or calculated pixel brightness values ​​into specific pixel data that can be directly used by display hardware. This can be achieved through rasterization algorithms, for example, by directly mapping the third brightness value of each pixel to the corresponding pixel in the bitmap. Another approach is to determine the final color or brightness code of each pixel in the bitmap based on its third brightness value, combined with a preset color lookup table or grayscale levels.

[0093] A font bitmap comprises several sub-font bitmaps. A sub-font bitmap is a smaller, independent bitmap data block divided from the complete font bitmap according to the physical layout or logical partitioning of the display device. This division is to accommodate the architecture of a display device composed of multiple independent display modules. Each sub-font bitmap carries the pixel information of the font within the corresponding display module area. For example, if the display device consists of four display modules, the font bitmap can be divided into four sub-font bitmaps, each corresponding to the display area of ​​one display module. Each sub-font bitmap corresponds to one display module in the display device.

[0094] The correspondence between sub-font bitmaps and display modules ensures that each display module receives accurate font data for its assigned display area, thus enabling distributed display. After receiving the sub-font bitmap, each display module parses the received bitmap data and converts it into specific driving signals to control the brightness or color of each sub-pixel, thereby displaying a portion of the font within its respective display area.

[0095] The proposed solution first integrates the meticulously calculated third luminance values ​​corresponding to each pixel to generate a font bitmap for the target font. This font bitmap contains complete pixel-level luminance information of the target font across the entire display area. To accommodate the architecture of a display device that may consist of multiple independent display modules, the font bitmap is further logically or physically divided into several sub-font bitmaps, each sub-font bitmap precisely corresponding to the display area handled by a specific display module within the display device. Subsequently, for each independent display module, the system accurately sends its corresponding sub-font bitmap data to that module. Upon receiving the corresponding sub-font bitmap, the display module can drive its own display unit to display based on the pixel luminance information it contains. This mechanism ensures that even in complex display devices composed of multiple display modules, the sub-pixel-level processed font luminance information can be accurately transmitted to each display unit, thereby achieving seamless and high-precision display of the target font. This distributed data processing and transmission method not only solves the problem of adapting the overall font data to modular display devices, but also effectively utilizes the independent processing capabilities of each display module, improving display efficiency and data transmission parallelism, and ensuring the consistency and high quality of font display in complex display environments.

[0096] The following example provides a more detailed explanation of the above technical solution: Suppose user A is reading an electronic document on a display device with an RGB subpixel arrangement. User A wants to enlarge a small font "A" in the document and move it a small distance to the right to improve readability.

[0097] First, after the display device receives the zoom and move target command from user A, the system reads the initial vector glyph outline corresponding to the initial font "A". This initial vector glyph outline is the mathematical geometric description of the font "A". Subsequently, based on this initial vector glyph outline and user A's target command, the system calculates and obtains the target vector glyph outline of the target font "A". For example, if the command is to zoom in by 1.2 times and move 5 pixels to the right, all coordinate points on the initial vector glyph outline will undergo corresponding scaling and translation transformations to obtain the accurate target vector glyph outline.

[0098] Next, the system analyzes each pixel in the display device based on the target vector glyph outline to obtain the first glyph coverage rate for each pixel. For example, for a pixel on the edge of the target font "A", its first glyph coverage rate may be between 0 and 1, indicating that the pixel is partially covered by the glyph outline. For pixels completely inside the glyph, the coverage rate is 1; for pixels completely outside the glyph, the coverage rate is 0.

[0099] Then, for each pixel, the system calculates the second glyph coverage for each sub-pixel within that pixel based on the display device's sub-pixel arrangement parameters (e.g., horizontal sub-pixel arrangement) and the pixel's first glyph coverage. For example, a pixel might contain a red sub-pixel, a green sub-pixel, and a blue sub-pixel. If this pixel is located on the diagonal of the target font "A," the red sub-pixel might be 80% covered, the green sub-pixel 50% covered, and the blue sub-pixel only 20% covered. This precise sub-pixel-level coverage calculation accurately reflects the geometric information of the glyphs at the sub-pixel level.

[0100] Finally, the system controls the display device to display the target font "A" based on the coverage rate of the second glyph corresponding to each sub-pixel within each pixel. Specifically, the brightness or color intensity of each sub-pixel is adjusted according to its second glyph coverage rate. For example, sub-pixels with high coverage are illuminated brighter, while sub-pixels with low coverage are relatively darker. In this way, the edges of the target font "A" are smoothed at the sub-pixel level, rather than simply displayed as the on / off state of a full pixel.

[0101] Through the above process, this method can improve the precision of font rendering from the pixel level to the sub-pixel level. When the target font "A" is enlarged and moved, its edges no longer appear jagged, but rather smoother and clearer, effectively solving the problem of font edge jitter in traditional methods and significantly improving the display effect.

[0102] Based on the above examples, the technical concept of this method makes a significant technical contribution to the prior art. In the prior art, when moving or enlarging fonts, the glyph coverage is usually calculated and displayed only on a per-pixel basis. For example, if a pixel is covered by more than 50% of the glyph, the entire pixel is lit; otherwise, the entire pixel remains off. This coarse-grained processing method, especially when displaying small fonts or font edges, results in noticeable jagged edges on the fonts, the so-called "jitter phenomenon," which severely affects the visual experience.

[0103] In contrast, this method achieves refined rendering of font edges by introducing sub-pixel-level glyph coverage calculation and display control. Specifically, this method not only obtains the first glyph coverage of each pixel, but further, for each pixel, it obtains the second glyph coverage corresponding to each sub-pixel within that pixel based on the sub-pixel arrangement parameters of the display device. This means that even if a complete pixel is partially covered by glyphs, each sub-pixel within it can independently adjust its brightness or color intensity according to the actual proportion of coverage by the glyphs.

[0104] For example, when displaying the slant of the letter "A", existing technologies might treat the entire pixel as "on" or "off", resulting in a stepped edge. This method, however, can identify the different degrees to which the red, green, and blue sub-pixels within that pixel are covered by the glyph and adjust their brightness accordingly. The red sub-pixel might be 80% lit, the green sub-pixel 50%, and the blue sub-pixel 20%. This differentiated sub-pixel brightness control creates a visually smooth transition at the font edge, significantly reducing jagged edges and jitter.

[0105] As can be seen from the above, in the font processing method of the display device provided in the embodiments of this application, firstly, in response to the target instruction for the initial font, the initial vector glyph outline corresponding to the initial font is read, and the target vector glyph outline of the target font is obtained according to the initial vector glyph outline and the target instruction; the target instruction is used to perform movement processing or enlargement processing on the initial font, and then, according to the target vector glyph outline, the first glyph coverage rate corresponding to each pixel in the display device is obtained; the first glyph coverage rate is used to describe the area ratio of the pixel covered by the target vector glyph outline, and then, for each pixel, according to the sub-pixel arrangement parameters of the display device and the first glyph coverage rate of the pixel, the second glyph coverage rate corresponding to each sub-pixel in the pixel is obtained; the second glyph coverage rate is used to describe the area ratio of any sub-pixel in the pixel covered by the target vector glyph outline; the sub-pixel arrangement parameters are used to describe the arrangement characteristics of the sub-pixels in the pixels in the display device, and finally, according to the second glyph coverage rate corresponding to each sub-pixel in the pixel, the display device is controlled to display the target font. This application controls the display device based on the glyph coverage of each sub-pixel in each pixel. Compared with the prior art method of controlling the display of the target font on a unit of whole pixels, this application can improve the display control accuracy and thus avoid the target font from jittering on the display device.

[0106] Based on the font processing method for a display device provided in the above embodiments, this application further provides a font processing apparatus for a display device that implements the above method embodiments. Please refer to... Figure 6 , Figure 6 This is a schematic diagram of the structure of a font processing device for a display device provided in an embodiment of this application. Figure 6 As shown, the font processing device 20 of the display device may include a first acquisition unit 61, a second acquisition unit 62, a third acquisition unit 63, and a control unit 64. Wherein: The first acquisition unit 61 is used to read the initial vector glyph outline corresponding to the initial font in response to the target instruction for the initial font, and to acquire the target vector glyph outline of the target font according to the initial vector glyph outline and the target instruction; the target instruction is used to move or enlarge the initial font.

[0107] The second acquisition unit 62 is used to acquire the first character coverage rate corresponding to each pixel in the display device according to the target vector character outline; the first character coverage rate is used to describe the proportion of the area of ​​the pixel covered by the target vector character outline.

[0108] The third acquisition unit 63 is used to acquire, for each pixel, a second glyph coverage rate corresponding to each sub-pixel in the pixel based on the sub-pixel arrangement parameters of the display device and the first glyph coverage rate of the pixel; the second glyph coverage rate is used to describe the area ratio of any sub-pixel in the pixel covered by the target vector glyph outline; the sub-pixel arrangement parameters are used to describe the arrangement characteristics of the sub-pixels in the pixel of the display device.

[0109] The control unit 64 is used to control the display device to display the target font according to the second glyph coverage rate corresponding to each sub-pixel in the pixel.

[0110] Optionally, the subpixel arrangement parameters include the subpixel arrangement method and the subpixel arrangement distance; the third acquisition unit 63 is specifically used for: Obtain the pixel coordinate information of the pixel; Based on the sub-pixel arrangement and pixel coordinate information, obtain the sub-pixel coordinate information corresponding to each sub-pixel in the pixel; Based on the sub-pixel coordinates of each sub-pixel in the pixel, the first glyph coverage of the pixel, and the sub-pixel arrangement distance, obtain the second glyph coverage of each sub-pixel in the pixel.

[0111] Optionally, the third acquisition unit 63 is specifically used for: Based on the first glyph coverage of the pixel, determine the first offset between the pixel center and the target vector glyph outline; For a sub-pixel within a pixel, based on the sub-pixel coordinate information, sub-pixel arrangement distance, and first offset, a second offset between the sub-pixel and the target vector glyph outline is obtained. Then, based on the second offset corresponding to the sub-pixel and a preset mapping relationship, a second glyph coverage corresponding to the sub-pixel is obtained. The preset mapping relationship is used to describe the relationship between the offset and the glyph coverage.

[0112] Optionally, the control unit 64 is specifically used for: Obtain the color information of the target font at each pixel; For each pixel, the first brightness value corresponding to each sub-pixel in the pixel is determined based on the second glyph coverage of each sub-pixel in the pixel. Based on the color information of the target font on the pixel, the brightness correction coefficient corresponding to each sub-pixel in the pixel is obtained. Based on the first brightness value and the brightness correction coefficient corresponding to each sub-pixel in the pixel, the second brightness value corresponding to each sub-pixel in the pixel is obtained. Based on the second brightness value corresponding to each sub-pixel in the pixel, the third brightness value corresponding to the pixel is obtained. Based on the third brightness value corresponding to each pixel, the display device is controlled to display the target font.

[0113] Optionally, the control unit 64 is specifically used for: Identify whether a pixel corresponds to an edge portion of the target font; If the pixel corresponds to the edge of the target font, then the brightness correction coefficient corresponding to each sub-pixel in the pixel is obtained according to the color information of the pixel and the color information of the background of the edge of the target font. If the pixel is not the pixel corresponding to the edge part of the target font, then the brightness correction coefficient corresponding to each sub-pixel in the pixel is obtained according to the color information of the pixel.

[0114] Optionally, the control unit 64 is specifically used for: For each sub-pixel in a pixel, the product of the first brightness value corresponding to the sub-pixel and the brightness correction coefficient corresponding to the sub-pixel is determined as the second brightness value corresponding to the sub-pixel.

[0115] Optionally, the control unit 64 is specifically used for: Obtain the preset correction coefficients; For each sub-pixel in the pixel, the second brightness value of the sub-pixel is subjected to non-linear brightness transformation processing according to the correction coefficient to obtain the fourth brightness value of the sub-pixel after brightness transformation processing. Then, the fourth brightness value of the sub-pixel is normalized and / or color gamut limiting processing is performed to obtain the fifth brightness value of the sub-pixel. Obtain the brightness weight value corresponding to each sub-pixel; The third brightness value of a pixel is determined based on the fifth brightness value and brightness weight value corresponding to each sub-pixel in the pixel.

[0116] Optionally, the control unit 64 is specifically used for: Based on the third brightness value corresponding to each pixel, a font bitmap corresponding to the target font is generated; the font bitmap includes several sub-font bitmaps, and each sub-font bitmap corresponds to a display module in a display device; For each display module, a corresponding sub-font bitmap is sent to the display module to instruct the display module to display according to the corresponding sub-font bitmap.

[0117] Optionally, the first acquisition unit 61 is specifically used for: Calculate the initial vector glyph contour and the intermediate vector glyph contour corresponding to the target instruction; Obtain the pixel grid information of the display device, adjust the size of the middle vector character outline, and / or adjust the position of the middle vector character outline until the middle vector character outline is aligned with the pixel grid of the display device, and determine the adjusted middle vector character outline as the target vector character outline.

[0118] It should be noted that the information interaction and execution process between the above-mentioned units are based on the same concept as the method embodiments of this application. Their specific functions and technical effects can be referred to the method embodiments section, and will not be repeated here.

[0119] Please see Figure 7 , Figure 7 This is a schematic diagram of the structure of a display device provided in an embodiment of this application. Figure 7 As shown, the display device 7 provided in this embodiment may include: a processor 70, a memory 71, and a computer program 72 stored in the memory 71 and executable on the processor 70. For example, a program corresponding to a font processing method for the display device. When the processor 70 executes the computer program 72, it implements the steps described above in the embodiment of the font processing method for the display device, for example... Figure 1 S101~S104 shown Figure 2 S201~S203 shown Figure 3 S301~S302 shown Figure 4 S401~S403 and shown Figure 5 S501~S504 are shown. Alternatively, when the processor 70 executes the computer program 72, it implements the functions of each module / unit in the embodiment corresponding to the font processing device of the above-described display device, for example... Figure 6 The functions of units 61-64 shown.

[0120] For example, computer program 72 can be divided into one or more modules / units, one or more of which are stored in memory 71 and executed by processor 70 to complete this application. One or more modules / units can be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of computer program 72 in display device 7. For example, computer program 72 can be divided into a first acquisition unit 61, a second acquisition unit 62, a third acquisition unit 63, and a control unit 64. For the specific functions of each unit, please refer to... Figure 6 The relevant descriptions in the corresponding embodiments are not repeated here.

[0121] Those skilled in the art will understand that Figure 7 This is merely an example of display device 7 and does not constitute a limitation on display device 7. It may include more or fewer components than shown, or combine certain components, or use different components.

[0122] The processor 70 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0123] The memory 71 can be an internal storage unit of the display device 7, such as a hard disk or RAM in the display device 7. The memory 71 can also be an external storage device of the display device 7, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, or flash card equipped on the display device 7. Furthermore, the memory 71 can include both internal and external storage units of the display device 7. The memory 71 is used to store computer programs and other programs and data required by the display device. The memory 71 can also be used to temporarily store data that has been output or will be output.

[0124] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units is merely an example. In practical applications, the above functions can be assigned to different functional units as needed, that is, the internal structure of the font processing device of the display device can be divided into different functional units to complete all or part of the functions described above. The functional units in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0125] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the steps in the various method embodiments described above.

[0126] This application provides a computer program product that, when run on a terminal device, enables the terminal device to implement the steps described in the various method embodiments above.

[0127] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, refer to the relevant descriptions of other embodiments.

[0128] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0129] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A font processing method of a display device, characterized by, include: In response to a target instruction for an initial font, the initial vector glyph outline corresponding to the initial font is read, and the target vector glyph outline of the target font is obtained based on the initial vector glyph outline and the target instruction; the target instruction is used to perform movement processing or enlargement processing on the initial font. Based on the target vector glyph outline, the first glyph coverage rate corresponding to each pixel in the display device is obtained; the first glyph coverage rate is used to describe the proportion of the area of ​​the pixel covered by the target vector glyph outline; For the pixel, based on the sub-pixel arrangement parameters of the display device and the first glyph coverage rate of the pixel, a second glyph coverage rate corresponding to each sub-pixel in the pixel is obtained; the second glyph coverage rate is used to describe the area ratio of any sub-pixel in the pixel covered by the target vector glyph outline; the sub-pixel arrangement parameters are used to describe the arrangement characteristics of the sub-pixels in the pixel of the display device; The display device is controlled to display the target font based on the coverage rate of the second glyph corresponding to each sub-pixel in the pixel.

2. The method of claim 1, wherein, The subpixel arrangement parameters include the subpixel arrangement method and the subpixel arrangement distance; obtaining the second glyph coverage rate corresponding to each subpixel in the pixel based on the subpixel arrangement parameters of the display device and the first glyph coverage rate of the pixel includes: Obtain the pixel coordinate information of the pixel; Based on the sub-pixel arrangement and the pixel coordinate information, obtain the sub-pixel coordinate information corresponding to each sub-pixel in the pixel; Based on the sub-pixel coordinate information corresponding to each sub-pixel in the pixel, the first glyph coverage of the pixel, and the sub-pixel arrangement distance, the second glyph coverage of each sub-pixel in the pixel is obtained.

3. The method of claim 2, wherein, The step of obtaining the second glyph coverage rate corresponding to each sub-pixel in the pixel based on the sub-pixel coordinate information corresponding to each sub-pixel in the pixel, the first glyph coverage rate of the pixel, and the sub-pixel arrangement distance includes: Based on the first glyph coverage of the pixel, determine the first offset between the pixel center and the target vector glyph outline; For a sub-pixel within the pixel, a second offset between the sub-pixel and the target vector glyph contour is obtained based on the sub-pixel coordinate information, the sub-pixel arrangement distance, and the first offset. Furthermore, the second glyph coverage rate corresponding to the sub-pixel is obtained based on the second offset and a preset mapping relationship. The preset mapping relationship describes the relationship between the offset and the glyph coverage rate.

4. The method of claim 1, wherein, The step of controlling the display device to display the target font based on the second glyph coverage rate corresponding to each sub-pixel in the pixel includes: Obtain the color information of the target font at each pixel; For the pixel, based on the second glyph coverage rate corresponding to each sub-pixel in the pixel, a first brightness value corresponding to each sub-pixel in the pixel is determined. Based on the color information of the target font on the pixel, a brightness correction coefficient corresponding to each sub-pixel in the pixel is obtained. Based on the first brightness value and the brightness correction coefficient corresponding to each sub-pixel in the pixel, a second brightness value corresponding to each sub-pixel in the pixel is obtained. Based on the second brightness value corresponding to each sub-pixel in the pixel, a third brightness value corresponding to the pixel is obtained. The display device is controlled to display the target font based on the third brightness value corresponding to each pixel.

5. The method of claim 4, wherein, The step of obtaining the brightness correction coefficient corresponding to each sub-pixel in the pixel based on the color information of the target font on the pixel includes: Identify whether the pixel corresponds to the edge portion of the target font; If the pixel is a pixel corresponding to the edge portion of the target font, then according to the color information of the pixel and the color information of the background of the edge portion of the target font, the brightness correction coefficient corresponding to each sub-pixel in the pixel is obtained respectively; If the pixel is not the pixel corresponding to the edge part of the target font, then the brightness correction coefficient corresponding to each sub-pixel in the pixel is obtained according to the color information of the pixel.

6. The method of claim 4, wherein, The step of obtaining the second brightness value corresponding to each sub-pixel of the pixel based on the first brightness value corresponding to each sub-pixel of the pixel and the brightness correction coefficient includes: For each sub-pixel in the pixel, the product of the first brightness value corresponding to the sub-pixel and the brightness correction coefficient corresponding to the sub-pixel is determined as the second brightness value corresponding to the sub-pixel.

7. The method of claim 4, wherein, The step of obtaining the third brightness value corresponding to the pixel based on the second brightness value corresponding to each sub-pixel in the pixel includes: Obtain the preset correction coefficients; For each sub-pixel in the pixel, the second brightness value of the sub-pixel is subjected to non-linear brightness transformation processing according to the correction coefficient to obtain the fourth brightness value of the sub-pixel after brightness transformation processing, and the fourth brightness value of the sub-pixel is subjected to normalization processing and / or color gamut limiting processing to obtain the fifth brightness value of the sub-pixel. Obtain the brightness weight value corresponding to each sub-pixel; The third brightness value corresponding to the pixel is determined based on the fifth brightness value and the brightness weight value corresponding to each sub-pixel in the pixel.

8. The method of claim 4, wherein, The step of controlling the display device to display the target font based on the third brightness value corresponding to each pixel includes: A font bitmap corresponding to the target font is generated based on the third brightness value corresponding to each pixel; the font bitmap includes several sub-font bitmaps, and each sub-font bitmap corresponds to a display module in the display device; For each of the display modules, a corresponding sub-font bitmap is sent to the display module to instruct the display module to display according to the corresponding sub-font bitmap.

9. The method according to any one of claims 1 to 8, characterized in that, The step of obtaining the target vector glyph outline of the target font based on the initial vector glyph outline and the target instruction includes: Calculate the initial vector glyph contour and the intermediate vector glyph contour corresponding to the target instruction; Obtain the pixel grid information of the display device, adjust the size of the intermediate vector glyph outline, and / or adjust the position of the intermediate vector glyph outline until the intermediate vector glyph outline is aligned with the pixel grid of the display device, and determine the adjusted intermediate vector glyph outline as the target vector glyph outline.

10. A display 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 computer program, it implements each step of the font processing method of the display device as described in any one of claims 1 to 9.