Display device and textbox adjusting method
By detecting and adjusting the overlap of text boxes in multi-language display devices, the user interface layout problems caused by changes in character length and height are solved, and the aesthetics and readability of the interface are improved.
Patent Information
- Application Number
- CN202410934236.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2025-03-11
AI Technical Summary
In multilingual supported display devices, changes in character length and height lead to insufficient size of the original fixed user interface elements, causing problems such as element overlap and out-of-type layout, affecting the aesthetics and readability of the user interface.
By detecting whether the two text boxes overlap, determine the overlap direction, and reduce the font size or width of the text boxes according to the overlap direction, and even set a marble style to avoid overlap.
It effectively improves the aesthetics and readability of the user interface, ensuring the stability and consistency of the user interface layout in different language environments.
Smart Images

Figure CN119603519A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of display devices, and in particular to a display device and a text box adjustment method. Background Art
[0002] In the context of the continuous expansion of the global market, in order to cater to a wide range of international user groups, TVs have integrated multi-language support, covering dozens of language options to meet the needs of the global market. However, given the significant differences in font characteristics between various languages, especially the changes in character length and height, when switching from one language to another, the fixed user interface element sizes originally designed for a specific language (such as text boxes, button sizes, etc.) often encounter challenges. When encountering languages with significantly increased character sizes, these preset size restrictions are not enough to accommodate the increased text height and width, which in turn causes confusion in the user interface layout, including overlapping elements, misaligned layouts, and other issues, affecting the aesthetics and readability of the user interface. Summary of the invention
[0003] Some embodiments of the present application provide a display device and a text box adjustment method. When it is detected that two text boxes overlap, the overlapping direction of the text boxes is determined. According to the overlapping direction of the text boxes, the overlapping text boxes are corrected by reducing the font size, etc., to improve the aesthetics and readability of the user interface.
[0004] In a first aspect, some embodiments of the present application provide a display device, including:
[0005] monitor;
[0006] The controller is configured as:
[0007] Get the first text box and the second text box in the page;
[0008] Determine whether the first text box overlaps with the second text box;
[0009] If the first text box overlaps with the second text box, determining an overlapping direction of the first text box and the second text box;
[0010] If the overlapping direction is a vertical direction, the font size of the text in the first text box and / or the second text box is reduced so that the first text box does not overlap with the second text box.
[0011] In some embodiments, the controller executes reducing the font size of the text in the first text box and / or the second text box, and is further configured to:
[0012] If there is a third text box overlapping the first target area and there is a fourth text box overlapping the second target area, reducing the font size of the text in the first text box and / or the second text box;
[0013] Among them, the first target area includes the non-overlapping area of the first moving text box and the first text box, the first moving text box includes the first text box moved by the first target distance in the opposite direction of the position of the second text box, the first target distance includes the height of the overlapping area of the first text box and the second text box, the second target area includes the non-overlapping area of the second moving text box and the second text box, and the second moving text box includes the second text box moved by the first target distance in the opposite direction of the position of the first text box.
[0014] In some embodiments, the controller is configured to:
[0015] If there is no third text box overlapping the first target area, the first text box is moved by a first target distance in a direction opposite to the position of the second text box.
[0016] In some embodiments, the controller is configured to:
[0017] If there is no fourth text box overlapping the second target area, the second text box is moved by a first target distance in a direction opposite to the position of the first text box.
[0018] In some embodiments, the controller is configured to:
[0019] If the overlapping direction is the horizontal direction, the width of the first text box and / or the second text box is reduced, and the first text box and / or the second text box is set to a marquee style.
[0020] In some embodiments, the controller executes reducing the width of the first text box and / or the second text box, and setting the first text box and / or the second text box to a scrolling lantern style, and is further configured to:
[0021] If there is a third text box overlapping the first target area and there is a fourth text box overlapping the second target area, reducing the width of the first text box and / or the second text box, and setting the first text box and / or the second text box to a marquee style;
[0022] Among them, the first target area includes the non-overlapping area of the first moving text box and the first text box, the first moving text box includes the first text box moved by the second target distance in the opposite direction of the position of the second text box, the second target distance includes the width of the overlapping area between the first text box and the second text box, the second target area includes the non-overlapping area of the second moving text box and the second text box, and the second moving text box includes the second text box moved by the second target distance in the opposite direction of the position of the first text box.
[0023] In some embodiments, the controller is configured to:
[0024] If there is no third text box overlapping the first target area, the first text box is moved by a second target distance in a direction opposite to the position of the second text box.
[0025] In some embodiments, the controller is configured to:
[0026] If there is no fourth text box overlapping the second target area, the second text box is moved by a second target distance in a direction opposite to the position of the first text box.
[0027] In some embodiments, before determining whether the first text box overlaps with the second text box, the controller is configured to:
[0028] Obtaining column positions corresponding to a first text box and a second text box in a page, wherein the first text box and the second text box are nested in the column positions;
[0029] If the first text box or the second text box exceeds the column position, reduce the font size of the text in the first text box or the second text box so that the first text box or the second text box does not exceed the column position after reduction.
[0030] In a second aspect, some embodiments of the present application provide a text box adjustment method, including:
[0031] Get the first text box and the second text box in the page;
[0032] Determine whether the first text box overlaps with the second text box;
[0033] If the first text box overlaps with the second text box, determining an overlapping direction of the first text box and the second text box;
[0034] If the overlapping direction is a vertical direction, the font size of the text in the first text box and / or the second text box is reduced so that the first text box does not overlap with the second text box.
[0035] Some embodiments of the present application provide a display device and a text box adjustment method. Obtain a first text box and a second text box in a page; determine whether the first text box and the second text box overlap; if the first text box and the second text box overlap, determine the overlapping direction of the first text box and the second text box; if the overlapping direction is vertical, reduce the font size of the text in the first text box and / or the second text box so that the first text box does not overlap with the second text box. When an embodiment of the present application detects that two text boxes overlap, it determines the overlapping direction of the text boxes, and according to the overlapping direction of the text boxes, makes corrections such as reducing the font size of the overlapping text boxes to improve the aesthetics and readability of the user interface. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the embodiments of the present application 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 application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0037] Figure 1 A schematic diagram of an operation scenario between a display device and a control device provided in some embodiments of the present application;
[0038] Figure 2 A schematic diagram of the hardware configuration of a display device provided in some embodiments of the present application;
[0039] Figure 3 A schematic diagram of software configuration of a display device provided in some embodiments of the present application;
[0040] Figure 4 A schematic diagram of a comparison between English and Burmese texts provided for some embodiments of the present application;
[0041] Figure 5 A flowchart of a text box adjustment method provided in some embodiments of the present application;
[0042] Figure 6 A schematic diagram of a method for establishing a coordinate system provided in some embodiments of the present application;
[0043] Figure 7 A schematic diagram of vertically overlapping text boxes provided in some embodiments of the present application;
[0044] Figure 8 A schematic diagram of horizontally overlapping text boxes provided in some embodiments of the present application;
[0045] Fig. 9A schematic diagram of a vertically overlapping text box processing effect provided in some embodiments of the present application;
[0046] Fig.10 A schematic diagram of a horizontally overlapping text box processing effect provided in some embodiments of the present application. DETAILED DESCRIPTION
[0047] The following embodiments are described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following embodiments do not represent all implementations consistent with the present application. They are only examples of systems and methods consistent with some aspects of the present application as detailed in the claims.
[0048] It should be noted that the brief description of terms in this application is only for the convenience of understanding the embodiments described below, and is not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be understood according to their common and usual meanings.
[0049] The terms "first", "second", "third", etc. in the specification and claims of this application and the above drawings are used to distinguish similar or similar objects or entities, and do not necessarily mean to limit a specific order or sequence, unless otherwise noted. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances.
[0050] The terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device comprising a list of components is not necessarily limited to all the components expressly listed but may include other components not expressly listed or inherent to such product or device.
[0051] The term "module" refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code that is capable of performing the functions associated with that element.
[0052] In the embodiment of the present application, the display device 200 generally refers to a device with image display and data processing capabilities. For example, the display device 200 includes but is not limited to a smart TV, a mobile terminal, a computer, a monitor, an advertising screen, a wearable device, a virtual reality device, an augmented reality device, etc.
[0053] Figure 1 This is a schematic diagram of an operation scenario between a display device and a control device provided in some embodiments of the present application. Figure 1As shown in FIG. 1 , a user can operate the display device 200 through touch operation, the mobile terminal 300 and the control device 100. The control device 100 is used to receive operation instructions input by the user and convert the operation instructions into control instructions that can be recognized and responded to by the display device 200. For example, the control device 100 can be a remote controller, a stylus pen, a handle, etc.
[0054] The mobile terminal 300 can be used as a control device for performing human-computer interaction between the user and the display device 200. The mobile terminal 300 can also be used as a communication device for establishing a communication connection with the display device 200 and performing data interaction. In some embodiments, the mobile terminal 300 can install software applications with the display device 200, and achieve connection and communication through a network communication protocol to achieve the purpose of one-to-one control operation and data communication. The audio and video content displayed on the mobile terminal 300 can also be transmitted to the display device 200 to achieve a synchronous display function.
[0055] In some embodiments, the mobile terminal 300 or other electronic devices may also simulate the functions of the control device 100 by running an application program for controlling the display device 200 .
[0056] like Figure 1 As also shown in FIG. 4 , the display device 200 also communicates data with the server 400 through various communication methods. The display device 200 may be allowed to communicate and connect through a local area network (LAN), a wireless local area network (WLAN), and other networks.
[0057] The display device 200 may provide a broadcast receiving television function, and may also additionally provide an intelligent network television function with a computer support function, including but not limited to network television, smart television, Internet Protocol television (IPTV), and the like.
[0058] Figure 2 Some embodiments of the present application provide Figure 1 2 is a block diagram of the hardware configuration of the display device 200.
[0059] In some embodiments, the display device 200 may include at least one of a tuner 210, a communication device 220, a detector 230, a device interface 240, a controller 250, a display 260, an audio output device 270, a memory, a power supply, and a user input interface.
[0060] In some embodiments, the detector 230 is used to collect signals of the external environment or external interaction. For example, the detector 230 includes a light receiver, a sensor for collecting the intensity of ambient light; or, the detector 230 includes an image collector, such as a camera, which can be used to collect external environment scenes, user attributes or user interaction gestures; or, the detector 230 includes a sound collector, such as a microphone, etc., for receiving external sounds.
[0061] In some embodiments, the display 260 includes a display function component for presenting a picture, and a driving component for driving an image display. The display 260 is used to receive an image signal output from the controller 250 for display. For example, the display 260 can be used to display video content, image content, and components of a menu control interface and a user control UI interface.
[0062] In some embodiments, the communication device 220 is a component for communicating with an external device or server 400 according to various communication protocol types. The display device 200 may be provided with a plurality of communication devices 220 according to different supported communication modes. For example, when the display device 200 supports wireless network communication, the display device 200 may be provided with a communication device 220 including a WiFi function. When the display device 200 supports Bluetooth connection communication, the display device 200 needs to be provided with a communication device 220 including a Bluetooth function.
[0063] The communication device 220 can enable the display device 200 to communicate with the external device or server 400 by wireless or wired connection. Among them, the wired connection can connect the display device 200 with the external device through components such as data cables and interfaces. The wireless connection can connect the display device 200 with the external device through wireless signals or wireless networks. The display device 200 can establish a connection relationship with the external device directly, or indirectly establish a connection relationship through a gateway, a router, a connection device, etc.
[0064] In some embodiments, the controller 250 may include at least one of a central processing unit, a video processor, an audio processor, a graphics processor, and a power processor, and a first interface to an nth interface for input / output. The controller 250 controls the operation of the display device and responds to the user's operation through various software control programs stored in the memory. The controller 250 controls the overall operation of the display device 200.
[0065] In some embodiments, the controller 250 and the tuner-demodulator 210 may be located in different separate devices, that is, the tuner-demodulator 210 may also be located in an external device of the main device where the controller 250 is located, such as an external set-top box.
[0066] In some embodiments, the user may input a user command through a graphical user interface (GUI) displayed on the display 260 , and the user input interface receives the user input command through the graphical user interface (GUI).
[0067] In some embodiments, the audio output device 270 may be a local speaker of the display device 200, or may be an external audio output device of the display device 200. In particular, for the external audio output device of the display device 200, the display device 200 may also be provided with an external audio output terminal, and the audio output device may be connected to the display device 200 through the external audio output terminal to output the sound of the display device 200.
[0068] In some embodiments, the user input interface 280 may be used to receive instructions from a user.
[0069] In order to perform user interaction, in some embodiments, the display device 200 may run an operating system. The operating system is a computer program for managing and controlling hardware resources and software resources in the display device 200. The operating system can control the display device to provide a user interface, for example, the operating system can directly control the display device to provide a user interface, or can provide a user interface by running an application program. The operating system also allows the user to interact with the display device 200.
[0070] It should be noted that the operating system may be a native operating system based on a specific operating platform, or a third-party operating system deeply customized based on a specific operating platform, or an independent operating system specially developed for the display device.
[0071] The operating system can be divided into different modules or layers according to the functions implemented, such as Figure 3 As shown, in some embodiments, the system is divided into four layers, from top to bottom, namely, the application layer (Applications) layer (referred to as "application layer"), the application framework layer (Application Framework) layer (referred to as "framework layer"), the system library layer and the kernel layer.
[0072] In some embodiments, the application layer is used to provide services and interfaces for applications so that the display device 200 can run applications and interact with users based on the applications. At least one application can be run in the application layer, and these applications can be window programs, system settings programs, clock programs, etc. that come with the operating system; they can also be applications developed by third-party developers. In specific implementations, the application packages in the application layer are not limited to the above examples.
[0073] The framework layer provides application programming interfaces (APIs) and programming frameworks for applications. The application framework layer includes some predefined functions. The application framework layer is equivalent to a processing center that determines the actions that applications in the application layer take. Through the API interface, applications can access system resources and obtain system services during execution.
[0074] like Figure 3 As shown, in the embodiment of the present application, the application framework layer includes a view system, managers, content providers, etc., wherein the view system can design and implement the interface and interaction of the application, and the view system includes lists, grids, text boxes, buttons, etc. The manager includes at least one of the following modules: an activity manager for interacting with all activities running in the system; a location manager for providing system services or applications with access to system location services; a package manager for retrieving various information related to the application package currently installed on the device; a notification manager for controlling the display and clearing of notification messages; and a window manager for managing icons, windows, toolbars, wallpapers, and desktop widgets on the user interface.
[0075] In some embodiments, the activity manager is used to manage the life cycle of each application and the usual navigation back function, such as controlling the exit, opening, and back of the application. The window manager is used to manage all window programs, such as obtaining the display screen size, determining whether there is a status bar, locking the screen, capturing the screen, and controlling the display window changes, for example, reducing the display window, shaking the display, distorting the display, etc.
[0076] In some embodiments, the system runtime layer can provide support for the framework layer. When the framework layer is used, the operating system will run the instruction library contained in the system runtime layer, such as the C / C++ instruction library, to implement the functions to be implemented by the framework layer.
[0077] In some embodiments, the kernel layer is a functional layer between the hardware and software of the display device 200. The kernel layer can implement functions such as hardware abstraction, multitasking, and memory management. Figure 3As shown, the kernel layer may be configured with hardware drivers, and the drivers included in the kernel layer may be at least one of the following drivers: audio driver, display driver, Bluetooth driver, camera driver, WIFI driver, USB driver, HDMI driver, sensor driver (such as fingerprint sensor, temperature sensor, pressure sensor, etc.), and power driver, etc.
[0078] It should be noted that the above example is only a simple division of the operating system functions and does not constitute a limitation on the specific operating system form of the display device 200 in the embodiment of the present application. Depending on factors such as the function of the display device and the type of operating system, the number of levels and specific level types contained in the operating system may be expressed in other forms.
[0079] With the continuous development of the television industry, television brands are no longer limited to sales in a single country or region, and are gradually opening up various countries and regions. What comes with it is multi-language adaptation. In the whole process, text overflow problems account for a large proportion, and the text overflow problem is directly reflected in the TV interface. Users can feel it intuitively. Therefore, text overflow will affect the user experience and affect the brand's market share in other countries.
[0080] The menu levels displayed on the TV interface are complex and the correctness of all interface UIs cannot be guaranteed, especially after switching languages. The original format may become incorrect due to changes in the length of the text content, causing text overflow and overlapping of multiple text modules on the interface.
[0081] The current TV system supports about 66 languages, but this diversity also brings challenges. When different languages express the same content, the length of the text and the height of the font show significant differences. However, the element box size in the user interface is pre-set and fixed, which leads to a problem: when the user switches languages, the translated text may not fit the original element box because the text is too long or the font height is too high, and then overlap with the surrounding elements, affecting the visual effect and user experience.
[0082] For example, while maintaining the same font size, Burmese characters, with their unique font design, take up more vertical space than most common languages. When the user interface language is converted from English to Burmese, due to the inherent height increase of Burmese characters, the ideal line height setting previously tailored for English text is no longer appropriate, resulting in overlapping text lines. For specific visual impacts, see Figure 4 This scenario highlights the importance of adjusting for the specific size requirements of each language when designing for multilingual interfaces.
[0083] When different languages express the same information, there are significant differences in the number of text characters and space requirements, especially in languages such as Arabic, Russian and Ukrainian, which often exhibit longer text expressions. When the text content of such languages exceeds the preset UI element width, it will cause a layout conflict, that is, the text overflows the original boundary and overlaps with adjacent interface elements. Under the unified interface layout, the abnormal extension of the Arabic translation text not only causes unnecessary stretching of the text container, but also triggers the overlap problem with surrounding elements, which directly affects the aesthetics of the interface and the readability of the information.
[0084] In order to solve the above technical problems, the embodiment of the present application provides a display device 200. The structure and functions of each part of the display device 200 can refer to the above embodiment. In addition, based on the display device 200 shown in the above embodiment, this embodiment further improves some functions of the display device 200. Figure 5 As shown, the controller 250 (at least one processor) enables the display device 200 to perform the following steps by running the application:
[0085] Step S501: Get the first text box and the second text box in the page;
[0086] After receiving the user input command to display the page, the information of all elements in the page is obtained. Among them, the elements include text boxes and column positions. The information of the elements includes the coordinates and size of the elements. The text box refers to the rectangular box corresponding to the text, and the size of the text box varies with the size of the text. It should be noted that the text box in the embodiment of the present application is an atomic box, that is, the smallest unit box, and there is no situation where one text box is completely covered by another text box.
[0087] The instruction to display a page may be a power-on instruction or a page switching instruction input by a user, or may be an instruction to display the page automatically generated by the display device 200 when a certain page jump condition is triggered.
[0088] In the embodiment of the present application, the pages include pages related to system settings and prompts, that is, the data of the pages are stored locally, as well as pages of desktop applications and third-party applications, that is, the data of the pages need to be sent from the server.
[0089] The page style of all elements on the page can be obtained through the specified port. The style contains bounds, which can obtain the position information of the element. All text boxes, that is, text elements, on the page can be traversed to save the corresponding position information of the text boxes.
[0090] The text box includes a rectangular box, and the position information may include the coordinates of four vertices. For example, the position information is the coordinates of the upper left corner (x1, y1), the coordinates of the lower left corner (x2, y2), the coordinates of the upper right corner (x3, y3), and the coordinates of the lower right corner (x4, y4). The position information may also include the coordinates of one of the four vertices, and the width and height of the text box. For example, the position information is the coordinates of the upper left corner (x1, y1), the width w, and the height h.
[0091] After receiving the user input instruction to display the page, the first text box and the second text box in the page are obtained, that is, the position information corresponding to the first text box is obtained, and the upper left corner vertex coordinates (x A ,y A ), width w A and height h A , and the position information corresponding to the second text box, the coordinates of the upper left corner (x B ,y B ), width w B and height h B . Wherein, the second text box includes text boxes in the page except the first text box.
[0092] Information about all elements in the page can be used to draw the page and also to determine if there is overlap between text boxes.
[0093] Step S502: determining whether the first text box and the second text box overlap;
[0094] The step of determining whether the first text box overlaps with the second text box includes:
[0095] Determine whether the first text box and the second text box overlap in the horizontal direction, that is, determine whether the right border of the first text box is to the right of the left border of the second text box, and whether the left border of the first text box is to the left of the right border of the second text box;
[0096] If the right border of the first text box is to the right of the left border of the second text box, and the left border of the first text box is to the left of the right border of the second text box, it is determined that the first text box and the second text box overlap in the horizontal direction;
[0097] If the right border of the first text box is not to the right of the left border of the second text box, that is, the right border of the first text box is to the left of the left border of the second text box, it is determined that the first text box and the second text box do not overlap in the horizontal direction.
[0098] If the left border of the first text box is not to the left of the right border of the second text box, that is, the left border of the first text box is to the right of the right border of the second text box, it is determined that the first text box and the second text box do not overlap in the horizontal direction.
[0099] For example, Figure 6 As shown, a rectangular coordinate system is established with the lower left corner vertex of the display screen as the coordinate origin and the two adjacent sides where the lower left corner vertex is located as the x-axis and y-axis. The left boundary of the first text box is x=x A , the right border of the first text box is x=x A +w A , the left border of the second text box is x=x B , the right border of the second text box is x=x B +w B .
[0100] If x A +w A >x B And x A <x B +w B , it is determined that the first text box and the second text box overlap in the horizontal direction.
[0101] If x A +w A ≤x B or x A ≥x B +w B , it is determined that the first text box and the second text box do not overlap in the horizontal direction.
[0102] Determine whether the first text box and the second text box overlap in the vertical direction, that is, determine whether the lower boundary of the first text box is below the upper boundary of the second text box, and whether the upper boundary of the first text box is above the lower boundary of the second text box;
[0103] If the lower boundary of the first text box is below the upper boundary of the second text box, and the upper boundary of the first text box is above the lower boundary of the second text box, it is determined that the first text box and the second text box overlap in the vertical direction;
[0104] If the lower boundary of the first text box is not below the upper boundary of the second text box, that is, the lower boundary of the first text box is above the upper boundary of the second text box, it is determined that the first text box and the second text box do not overlap in the vertical direction;
[0105] If the upper boundary of the first text box is not above the lower boundary of the second text box, that is, the upper boundary of the first text box is below the lower boundary of the second text box, it is determined that the first text box and the second text box do not overlap in the vertical direction.
[0106] The upper boundary of the first text box is y=y A , the lower boundary of the first text box is y=y A -h A , the left edge of the second text box is y=yB , the right border of the second text box is y=y B -h B .
[0107] If y A -h A <y B And y A >y B -h B , it is determined that the first text box and the second text box overlap in the vertical direction.
[0108] If y A -h A ≥y B or A ≤y B -h B , it is determined that the first text box and the second text box do not overlap in the vertical direction.
[0109] If the first text box overlaps with the second text box both in the horizontal direction and in the vertical direction, determining that the first text box overlaps with the second text box;
[0110] That is (x A +w A >x B )∩(x A <x B +w B )∩(y A -h A <y B )∩(y A >y B -h B ), the first text box overlaps with the second text box.
[0111] If the first text box and the second text box overlap only in the horizontal direction or the vertical direction, or do not overlap in both the horizontal direction and the vertical direction, it is determined that the first text box and the second text box do not overlap.
[0112] It should be noted that in the embodiment of the present application, multiple text boxes on a page need to be detected for overlap between each other, and all text boxes that overlap each other need to be found.
[0113] In some embodiments, after acquiring the first text box and the second text box in the page, it is determined whether the first text box overlaps with the second text box.
[0114] In the embodiment of the present application, after obtaining the information of the text boxes in the page, it is necessary to determine whether the text boxes overlap each other. This can more comprehensively detect the overlapping of the text boxes, which is convenient for subsequent adjustment of the positions of the text boxes.
[0115] In some embodiments, a language flag may be set. When the language flag is a preset value, it indicates that the language is a specific language. When the language flag is not a preset value, it indicates that the language is not a specific language. Specific languages include languages whose usage rate is lower than a preset usage rate or languages whose single characters are too long or too high. Such languages are likely to have overlapping elements and misaligned layout.
[0116] After obtaining the first text box and the second text box in the page, obtain the language flag;
[0117] Determine whether the language flag is a preset value;
[0118] If the language flag is a preset value, it is determined whether the first text box and the second text box overlap.
[0119] If the language flag is not a preset value, the step of determining whether the first text box and the second text box overlap is not performed, that is, there is no need to detect whether the text boxes overlap.
[0120] The embodiment of the present application performs text box overlap detection only when the page language is a specific language. When the page language is a non-specific language, there is no need to perform text box overlap detection, which can speed up the page display speed.
[0121] In some embodiments, before determining whether the first text box and the second text box overlap, obtaining the column positions corresponding to the first text box and the second text box in the page, wherein the first text box and the second text box are nested in the column positions;
[0122] It should be noted that a text box can be nested in one or more column positions. If a text box is nested in multiple column positions, it is necessary to determine whether the text box exceeds each column position in turn. The column position information is the upper left corner coordinate (x L ,y L ), width w L and height h L .
[0123] Determine whether the first text box or the second text box exceeds the column position;
[0124] Methods for determining whether the column position is exceeded include:
[0125] Taking the first text box as an example, it is determined whether the left and right boundaries of the first text box are between the left and right boundaries of the column position, and it is determined whether the upper and lower boundaries of the first text box are between the upper and lower boundaries of the column position.
[0126] If the left border of the first text box is to the right of the left border of the column position, and the right border of the first text box is to the left of the right border of the column position, and the upper border of the first text box is below the upper border of the column position, and the lower border of the first text box is above the lower border of the column position, then it is determined that the first text box does not exceed the column position.
[0127] If the left border of the first text box is to the left of the left border of the column position, or the right border of the first text box is to the right of the right border of the column position, or the upper border of the first text box is above the upper border of the column position, or the lower border of the first text box is below the lower border of the column position, then it is determined that the first text box exceeds the column position.
[0128] Exemplarily, the left edge of the first text box is x=x A , the right border of the first text box is x=x A +w A , the upper boundary of the first text box is y=y A , the lower boundary of the first text box is y=y A -h A The left edge of the column is x=x L , the right boundary of the column is x=x L +w L , the upper boundary of the column is y=y L , the lower boundary of the column is y=y L -h L .
[0129] If (x A ≥x L )∩(x A +w A ≤x L +w L )∩(y A ≤y L )∩(y A –h A ≥y L -h L ), then make sure that the first text box does not exceed the column position.
[0130] If (x A <x L )∪(x A +w A >x L +w L )∪(y A >y L )∪(y A –h A <y L -h L ), then determine that the first text box does not exceed the column position.
[0131] If the first text box or the second text box exceeds the column position, reduce the font size of the text in the first text box or the second text box so that the first text box or the second text box does not exceed the column position after reduction.
[0132] In some embodiments, if the text box only exceeds the corresponding column position in the horizontal direction, the horizontal exceeding distance D1 is calculated. If the text box is left-aligned, then D1 = x A +w A -(x L +w L ). If the text box is center aligned, D1=(x L -x A )×2. The adjusted font size is fs A '=fs A -D1.fs A Is the original font size.
[0133] In some embodiments, if the text box only exceeds the corresponding column position in the horizontal direction, the width of the text box is reduced and a ticker-shaped style is set. The width of the text box is less than or equal to the width of the column position.
[0134] In some embodiments, if the text box only exceeds its corresponding column position in the vertical direction, the vertical excess distance D2 is calculated. If the text box is top-aligned, then D1 = y L -h L -(y A –h A ). If the text box is aligned in the middle, D2 = (y A -y L )×2. The adjusted font size is fs A '=fs A -D2. fsA is the original font size.
[0135] In some embodiments, if the text box exceeds its corresponding column position in both horizontal and vertical directions, the horizontal excess distance D1 and the vertical excess distance D2 are calculated. If D1 is greater than or equal to D2, the adjusted font size is fs A '=fs A -D1. If D1 is smaller than D2, the adjusted font size is fs A '=fs A -D2.
[0136] In some embodiments, if the text box exceeds the corresponding column position in both horizontal and vertical directions, the vertical excess distance D2 is calculated. The adjusted font size is calculated as fsA'=fsA-D2, and the width of the text box is reduced, and the scrolling light style is set. The width of the text box is less than or equal to the width of the column position.
[0137] If the text boxes with nested column positions are not processed preferentially, the text boxes may be moved or other operations may be performed during the subsequent processing of the text boxes, causing the text boxes to deviate from the corresponding column positions, affecting the aesthetics and readability of the page. The embodiment of the present application first checks the text boxes with nested column positions to check whether they exceed the nested column positions. If they exceed, the text boxes are processed by reducing the font, reducing the text box width, and setting a marquee style, so that the text boxes do not exceed the column positions. Since the column positions will not overlap with each other, the text boxes that do not exceed the column positions will not overlap with each other. This can prevent the phenomenon that the text boxes deviate from the nested column positions in the subsequent processing of the text boxes after the text box overlap is detected, which helps to improve the aesthetics of the page.
[0138] It should be noted that after the text box that exceeds the column position is processed, the position information of the processed text box is used to determine whether the first text box and the second text box overlap.
[0139] If the first text box does not overlap with the second text box, it may continue to determine whether the first text box overlaps with the next second text box until all text boxes complete the overlap determination in pairs.
[0140] In some embodiments, if the first text box overlaps with the second text box, step S503 is performed: determining whether the overlapping direction of the first text box and the second text box is a vertical direction;
[0141] like Figure 7 As shown, there are three cases where the overlapping direction of the first text box and the second text box is the vertical direction. Vertical overlap refers to the overlapping phenomenon generated when the position relationship between the first text box and the second text box is an up-and-down relationship.
[0142] The step of determining whether the overlapping direction of the first text box and the second text box is a vertical direction includes:
[0143] Determine whether the upper boundary of the second text box is between the upper and lower boundaries of the first text box;
[0144] If the upper boundary of the second text box is between the upper and lower boundaries of the first text box, determine whether the lower boundary of the first text box is above the lower boundary of the second text box;
[0145] If the lower boundary of the first text box is above the lower boundary of the second text box, it is determined that the overlapping direction of the first text box and the second text box is a vertical direction.
[0146] If the upper boundary of the second text box is not between the upper and lower boundaries of the first text box, it is determined that the overlapping direction of the first text box and the second text box is not a vertical direction.
[0147] If the lower border of the first text box is not above the lower border of the second text box, it is determined that the overlapping direction of the first text box and the second text box is not a vertical direction.
[0148] For example, the upper and lower boundaries of the first text box are y A and A -h A , the upper and lower boundaries of the second text box are y B and B -h B If y A >y B >y A -h A And y A -h A >y B -h A , then the overlapping direction of the first text box and the second text box is the vertical direction.
[0149] If y B ≥y A or A -h A ≤y B -h A , the overlapping direction of the first text box and the second text box is not the vertical direction.
[0150] It should be noted that, since it has been determined before that the first text box overlaps with the second text box, if the overlapping direction is not a vertical direction, the overlapping direction must be a horizontal direction.
[0151] In some embodiments, if the first text box overlaps with the second text box, determining whether the overlapping direction of the first text box and the second text box is a horizontal direction;
[0152] like Figure 8 As shown, there are three situations in which the overlapping direction of the first text box and the second text box is horizontal. Horizontal overlap refers to the overlapping phenomenon that occurs when the position relationship between the first text box and the second text box is a left-right relationship.
[0153] The step of determining whether the overlapping direction of the first text box and the second text box is horizontal includes:
[0154] Determine whether the left border of the second text box is between the left and right borders of the first text box;
[0155] If the left border of the second text box is between the left and right borders of the first text box, determine whether the right border of the first text box is to the left of the right border of the second text box;
[0156] If the right border of the first text box is on the left side of the right border of the second text box, it is determined that the overlapping direction of the first text box and the second text box is a horizontal direction.
[0157] If the left border of the second text box is not between the left and right borders of the first text box, it is determined that the overlapping direction of the first text box and the second text box is not a horizontal direction.
[0158] If the right border of the first text box is not on the left side of the right border of the second text box, it is determined that the overlapping direction of the first text box and the second text box is not a horizontal direction.
[0159] For example, the left and right borders of the first text box are x A and x A +w A , the left and right borders of the second text box are x B and x B +w B If x A +w A >x B >x A And x B +w B >x A +w A , the overlapping direction of the first text box and the second text box is horizontal.
[0160] If x B ≤x A or x A +w A ≥x B +w B , the overlapping direction of the first text box and the second text box is not horizontal.
[0161] It should be noted that, since it has been determined that the first text box overlaps with the second text box, if the overlapping direction is not a horizontal direction, the overlapping direction must be a vertical direction.
[0162] It should be noted that the overlapping direction of the first text box and the second text box can be both horizontal and vertical. A default overlapping direction processing method can be selected to process it. For example, it can be determined first whether it is a vertical overlap. If it is a vertical overlap, it is processed in a manner corresponding to the vertical direction.
[0163] In some embodiments, if the first text box overlaps with the second text box, the page with the overlapping text boxes will be reported to the server so that the page can be more reasonably optimized later.
[0164] In some embodiments, if the overlapping direction is a vertical direction, step S504 is executed: reducing the font size of the text in the first text box and / or the second text box so that the first text box and the second text box do not overlap.
[0165] Calculate the overlap distance, that is, the height of the overlap area is the difference between the upper boundary of the second text box and the lower boundary of the first text box, that is, d1 = y B -(y A -h A ).
[0166] The font reduction ratio is determined based on the overlap distance.
[0167] In some embodiments, the font size reduction ratio of the text in the first text box is determined to be the overlap distance, and the adjusted font size in the first text box is fs A '=fs A -d1.fs A It is the original font size of the first text box, and the font size of the second text box remains unchanged.
[0168] In some embodiments, the font size reduction ratio of the text in the second text box is determined to be the overlap distance, and the adjusted font size in the second text box is fs B '=fs B -d1.fs B It is the original font size of the second text box. The font size of the first text box remains unchanged.
[0169] In some embodiments, the font size reduction ratio of the text in the first text box and the second text box is determined to be the overlap distance / 2, and the adjusted font size in the first text box is fs A '=fs A -d1 / 2, the adjusted font size in the second text box is fs B '=fs B -d1 / 2.
[0170] It should be noted that the first text box and the second text box reduce their font sizes in opposite directions.
[0171] In some embodiments, if the overlapping direction is a vertical direction, determining whether there is a third text box overlapping the first target area;
[0172] In some embodiments, the first target area includes a non-overlapping area in a first moving text box and the first text box, the first moving text box includes a first text box moved a first target distance in a direction opposite to a position of the second text box, and the first target distance includes the height of an overlapping area between the first text box and the second text box.
[0173] To determine whether there is a third text box overlapping the first target area, it is necessary to determine whether the bottom boundary of the third text box is in the first target area, and whether the left and right boundaries of the third text box are within the first target area or whether the horizontal boundary of the third text box covers the horizontal boundary of the first text box.
[0174] Exemplarily, let the condition satisfying the overlap with the first target area be C A . C A =There is a third text box E.
[0175] y A <y E -h E <y A +d1, and (x A <x E <x A +w A , or, x A <x E +w E <x A +w A , or, (x E <x A And x E +w E <x A +w A )).
[0176] If C A is true, it can be determined that there is a third text box overlapping the first target area. A If it is false, it can be determined that there is no third text box overlapping the first target area.
[0177] In some embodiments, the first target area includes a display area of the first mobile text box.
[0178] If the overlapping direction is a vertical direction, determining whether there is a fourth text box overlapping the second target area;
[0179] In some embodiments, the second target area includes a non-overlapping area of a second movable text box with the second text box, and the second movable text box includes a second text box moved in a direction opposite to a position of the first text box by a first target distance.
[0180] To determine whether there is a fourth text box overlapping the second target area, it is necessary to determine whether the upper boundary of the fourth text box is in the second target area, and whether the left and right boundaries of the fourth text box are within the second target area or whether the horizontal boundary of the fourth text box covers the horizontal boundary of the second text box.
[0181] Exemplarily, let the condition satisfying the overlap with the first target area be C B . C B =There is a fourth text box F.
[0182] y B -h B -d1<y F <y B -h B , and (x B <x F <x B +w B , or, x B <x F +w F <x B +w B , or, (x F <x B And x F +w F <x B +w B )).
[0183] If C B is true, it can be determined that there is a fourth text box overlapping the second target area. B If it is false, it can be determined that there is no fourth text box overlapping the second target area.
[0184] It should be noted that the third text box and the fourth text box refer to text boxes in the page except for the first text box and the second text box that have been determined to overlap.
[0185] In some embodiments, the second target area includes a display area of the second mobile text box.
[0186] If there is a third text box overlapping the first target area and there is a fourth text box overlapping the second target area, that is, C A and C B is true, reducing the font size of the text in the first text box and / or the second text box;
[0187] If there is no third text box overlapping the first target area, that is, C A is false, the first text box is moved in the opposite direction to the position of the second text box by a first target distance.
[0188] Move the first text box upward by an overlapping distance d1, that is, adjust the top coordinate of the first text box to y A '=y A +d1.
[0189] If there is no fourth text box overlapping the second target area, that is, C B is false, the second text box is moved in the opposite direction to the position of the first text box by a first target distance.
[0190] Move the second text box downward by an overlapping distance d1, that is, adjust the top coordinate of the second text box to y B '=y B -d1.
[0191] For example, Fig. 9 As shown in , text box A and text box B overlap each other in the vertical direction. If there is no other text box in the target area a above text box A, then text box A is moved upward by d1, and the position of text box B remains unchanged, as shown in Fig. 9 The effect is shown in (1). If there is no other text box in the target area b below text box B, then text box B is moved down by d1, and the position of text box A remains unchanged, as shown in Fig. 9 The effect is shown in (2). If both target area a and target area b have other text boxes, the font size of text box A and text box B will be reduced. When the font size is reduced, the text box will also be reduced, as shown in Fig. 9 The effect is shown in (3).
[0192] In some embodiments, when determining whether there is a text box overlapping with the first target area and the second target area, it is also possible to determine whether there is a column position overlapping with the first target area and the second target area. If there is a column position overlapping with the first target area and the second target area, the font size of the text in the first text box and / or the second text box is reduced without performing the operation of moving the first text box or the second text box.
[0193] In some embodiments, if the overlapping direction is a horizontal direction, step S505 is executed: reducing the width of the first text box and / or the second text box, and setting the first text box and / or the second text box to a marquee style.
[0194] Calculate the overlap distance, that is, the width of the overlap area is the difference between the right border of the first text box and the left border of the second text box, that is, d2 = (x A +w A )-x B .
[0195] The reduction width is determined based on the overlap distance.
[0196] In some embodiments, the reduced width of the first text box is determined to be the overlap distance, and the adjusted width w of the first text box is A '=w A -d2, sets the first text box to a scrolling style. The width of the second text box remains unchanged.
[0197] In some embodiments, the reduced width of the second text box is determined to be the overlap distance, and the adjusted width w of the second text box is B '=w B -d2, sets the second text box to a scrolling style. The width of the first text box remains unchanged.
[0198] In some embodiments, the reduced widths of the first text box and the second text box are determined to be the overlap distance / 2, and the adjusted width w of the first text box is A '=w A -d2 / 2, the adjusted width w of the second text box B '=w B -d2 / 2, set the first text box and the second text box to the marquee style.
[0199] It should be noted that the first text box and the second text box respectively reduce their widths in opposite directions.
[0200] In some embodiments, if the overlapping direction is a horizontal direction, determining whether there is a third text box overlapping the first target area;
[0201] In some embodiments, the first target area includes a non-overlapping area in a first moving text box and the first text box, the first moving text box includes a first text box moved a second target distance in a direction opposite to a position of the second text box, and the second target distance includes the width of an overlapping area between the first text box and the second text box.
[0202] To determine whether there is a third text box overlapping the first target area, it is necessary to determine whether the right border of the third text box is in the first target area, and whether the upper and lower borders of the third text box are within the first target area or whether the vertical border of the third text box covers the vertical border of the first text box.
[0203] Exemplarily, let the condition satisfying the overlap with the first target area be C A . C A =There is a third text box E.
[0204] x A -d2<x E +w E <x A , and (y A -hA <y E <y A , or, y A -h A <y E -h E <y A , or, (y E >y A And y E -h E <y A -h A )).
[0205] If C A is true, it can be determined that there is a third text box overlapping the first target area. A If it is false, it can be determined that there is no third text box overlapping the first target area.
[0206] If the overlapping direction is the horizontal direction, determining whether there is a fourth text box overlapping the second target area;
[0207] In some embodiments, the second target area includes a non-overlapping area of a second movable text box with the second text box, and the second movable text box includes a second text box moved in a direction opposite to a position of the first text box by a second target distance.
[0208] To determine whether there is a fourth text box overlapping the second target area, it is necessary to determine whether the left border of the fourth text box is in the second target area, and whether the upper and lower borders of the fourth text box are in the second target area or whether the vertical border of the fourth text box covers the vertical border of the second text box.
[0209] Exemplarily, let the condition satisfying the overlap with the first target area be C B . C B =There is a fourth text box F.
[0210] x B +w B <x E <x B +w B+ d2, and (y A -h A <y E <y A , or, y A -h A <y E -h E <y A , or, (y E >y A And y E -hE <y A -h A )).
[0211] If C B is true, it can be determined that there is a fourth text box overlapping the second target area. B If it is false, it can be determined that there is no fourth text box overlapping the second target area.
[0212] If there is a third text box overlapping the second target area and there is a fourth text box overlapping the second target area, that is, C A and C B is true, reducing the width of the first text box and / or the second text box, and setting the first text box and / or the second text box to a scrolling lantern style;
[0213] If there is no third text box overlapping the first target area, that is, C A is false, the first text box is moved in the opposite direction of the position of the second text box by the first target distance.
[0214] Move the first text box to the left by an overlapping distance d2, that is, adjust the top coordinate x of the first text box A '=x A -d2.
[0215] If there is no fourth text box overlapping the second target area, that is, C B is false, the second text box is moved in the opposite direction to the position of the first text box by a second target distance.
[0216] Move the second text box to the right by an overlapping distance d2, that is, adjust the top coordinate x of the second text box B '=x B +d2.
[0217] For example, Fig.10 As shown in the figure, text box A and text box B overlap each other in the horizontal direction. If there is no other text box in the target area a to the left of text box A, then text box A is moved to the left by d2, and the position of text box B remains unchanged, as shown in the figure. Fig.10 The effect is shown in (1). If there is no other text box in the target area b to the right of text box B, then move text box B to the right by d2, and the position of text box A remains unchanged, as shown in Fig.10 The effect is shown in (2). If both target area a and target area b have other text boxes, reduce the width of text box A and set the marquee style, such as Fig.10 The effect is shown in (3).
[0218] In some embodiments, when determining whether there is a text box overlapping with the first target area and the second target area, it is also possible to determine whether there is a column position overlapping with the first target area and the second target area. If there is a column position overlapping with the first target area and the second target area, the width of the first text box and / or the second text box is reduced and a ticker is set, without performing an operation of moving the first text box or the second text box.
[0219] The embodiment of the present application aims to automatically detect and intelligently correct the phenomenon of text crossing the boundary, so as to avoid the leakage of problems. When entering the target interface, by recursively traversing all elements in the user interface, that is, text boxes, and using computer algorithms to analyze the CSS style attributes of these elements in detail, it is intended to identify elements that overlap in position within the bounding box defined in the screen coordinate system. Once the overlap between elements is detected, the system will automatically intervene and strategically adjust the style rules of these overlapping elements. Specific measures include reducing the size layout of elements to reduce the actual space they occupy in the visual interface, and introducing the "marquee" effect as an innovative means of display, aiming to effectively resolve the space competition between multiple elements, and ensure that each UI component can coexist harmoniously on a limited screen, without hindering reading and interaction, thereby improving the user experience. The visual and operational experience of global users is guaranteed from the source, avoiding user loss due to interface defects.
[0220] The embodiments of the present application have the following advantages:
[0221] 1. Automation and high efficiency: By introducing advanced automated detection algorithms, we can quickly and thoroughly identify text crossing and overlapping issues in the user interface. Compared with the traditional method that relies on manual visual inspection and manual adjustment, this greatly shortens the testing cycle, reduces the burden on human resources, and makes large-scale internationalization and localization testing more feasible and efficient.
[0222] 2. Intelligent repair function: Different from traditional tools that can only detect problems, the embodiment of the present application further integrates an intelligent repair mechanism. Once a text layout error is detected, the system automatically adjusts the coordinates or size of the text box immediately, effectively solving the problem of text overlap, and completing interface optimization without manual intervention. This feature significantly improves the speed and accuracy of problem solving and reduces the number of iterations before the product is launched.
[0223] 3. Comprehensive coverage and preventive measures: In view of the complexity and diversity of interfaces, this application uses algorithms to traverse every interface element to ensure the comprehensiveness and depth of the test and avoid missing problems caused by blind spots in the test. This forward-looking preventive measure effectively blocks interface defects from entering the market and improves the consistency and satisfaction of user experience.
[0224] 4. Enhanced internationalization capabilities: Especially for situations where text length varies greatly and layout challenges are diverse in multilingual environments, this application provides strong support and can flexibly respond to interface adaptability requirements in different languages, ensuring that the software can provide a unified and high-quality visual presentation worldwide, thereby enhancing the product's international market competitiveness.
[0225] In summary, this application, with its automation, intelligence, comprehensiveness and internationalization characteristics, not only significantly improves testing efficiency and product quality, but also saves valuable resources for enterprises and reduces customer dissatisfaction and market risks caused by interface problems.
[0226] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
[0227] For the convenience of explanation, the above description has been made in conjunction with specific embodiments. However, the above exemplary discussion is not intended to be exhaustive or limit the embodiments to the specific forms disclosed above. Based on the above teachings, various modifications and variations can be obtained. The selection and description of the above embodiments are to better explain the principles and practical applications, so that those skilled in the art can better use the embodiments and various different variations of the embodiments suitable for specific use considerations.
Claims
1. A display device, characterized in that: include: monitor; The controller is configured as: Get the first text box and the second text box in the page; Determine whether the first text box overlaps with the second text box; If the first text box overlaps with the second text box, determining an overlapping direction of the first text box and the second text box; If the overlapping direction is a vertical direction, the font size of the text in the first text box and / or the second text box is reduced so that the first text box does not overlap with the second text box.
2. The display device according to claim 1, characterized in that The controller executes reducing the font size of the text in the first text box and / or the second text box, and is further configured to: If there is a third text box overlapping the first target area and there is a fourth text box overlapping the second target area, reducing the font size of the text in the first text box and / or the second text box; Among them, the first target area includes the non-overlapping area of the first moving text box and the first text box, the first moving text box includes the first text box moved by the first target distance in the opposite direction of the position of the second text box, the first target distance includes the height of the overlapping area of the first text box and the second text box, the second target area includes the non-overlapping area of the second moving text box and the second text box, and the second moving text box includes the second text box moved by the first target distance in the opposite direction of the position of the first text box.
3. The display device according to claim 2, characterized in that The controller is configured to: If there is no third text box overlapping the first target area, the first text box is moved by a first target distance in a direction opposite to the position of the second text box.
4. The display device according to claim 2, characterized in that The controller is configured to: If there is no fourth text box overlapping the second target area, the second text box is moved by a first target distance in a direction opposite to the position of the first text box.
5. The display device according to claim 1, characterized in that The controller is configured to: If the overlapping direction is the horizontal direction, the width of the first text box and / or the second text box is reduced, and the first text box and / or the second text box is set to a marquee style.
6. The display device according to claim 5, characterized in that The controller executes reducing the width of the first text box and / or the second text box, and setting the first text box and / or the second text box to a scrolling lantern style, and is further configured to: If there is a third text box overlapping the first target area and there is a fourth text box overlapping the second target area, reducing the width of the first text box and / or the second text box, and setting the first text box and / or the second text box to a marquee style; Among them, the first target area includes the non-overlapping area of the first moving text box and the first text box, the first moving text box includes the first text box moved by the second target distance in the opposite direction of the position of the second text box, the second target distance includes the width of the overlapping area between the first text box and the second text box, the second target area includes the non-overlapping area of the second moving text box and the second text box, and the second moving text box includes the second text box moved by the second target distance in the opposite direction of the position of the first text box.
7. The display device according to claim 6, characterized in that The controller is configured to: If there is no third text box overlapping the first target area, the first text box is moved by a second target distance in a direction opposite to the position of the second text box.
8. The display device according to claim 6, characterized in that The controller is configured to: If there is no fourth text box overlapping the second target area, the second text box is moved by a second target distance in a direction opposite to the position of the first text box.
9. The display device according to claim 1, characterized in that: Before determining whether the first text box overlaps with the second text box, the controller is configured to: Obtaining column positions corresponding to a first text box and a second text box in a page, wherein the first text box and the second text box are nested in the column positions; If the first text box or the second text box exceeds the column position, reduce the font size of the text in the first text box or the second text box so that the first text box or the second text box does not exceed the column position after reduction.
10. A text box adjustment method, characterized in that: include: Get the first text box and the second text box in the page; Determine whether the first text box overlaps with the second text box; If the first text box overlaps with the second text box, determining an overlapping direction of the first text box and the second text box; If the overlapping direction is a vertical direction, the font size of the text in the first text box and / or the second text box is reduced so that the first text box does not overlap with the second text box.
Citation Information
Patent Citations
Text display method and system
CN105159868A
Placement position adjusting method and device
CN106681586A
Application interface display method and device
CN111949169A
Labeling method and processing device of beam reinforcement diagram and computer readable storage medium
CN112800517A
Automatic typesetting method and system for constructional engineering image-text frame
CN116090037A