Method for accelerating font rendering in virtual target machine environment

By using the virtual font API to call the forwarding library and the receiving rendering library in the virtual target environment, the font rendering operations are transferred to the physical host environment, and the problems of low font rendering efficiency and low resource utilization in the virtual target environment are solved, and efficient font rendering and improved system performance are achieved.

CN119883503APending Publication Date: 2025-04-25CHENGDU AIRCRAFT DESIGN INST OF AVIATION IND CORP OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411913636.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

In virtual target machine environments, low font rendering efficiency, low resource utilization and large rendering latency affect system performance and user experience.

Method used

By making a virtual font API call forwarding library and a virtual font API call receive rendering library, the font rendering operation is transferred from the virtual target environment to the physical host environment to be executed.

Benefits of technology

It significantly improves font rendering efficiency, improves overall software execution efficiency, improves resource utilization, reduces rendering delay, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119883503A_ABST
    Figure CN119883503A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of virtual target machines, in particular to a method for accelerating font rendering in a virtual target machine environment, which comprises the following steps of: S1, manufacturing a virtual font API (Application Program Interface) call forwarding library; s2, a virtual font API calling forwarding library is integrated in a target machine application program operated in a virtual target machine environment; s3, making a virtual font API (Application Program Interface) calling and receiving rendering library; s4, integrating the virtual font API in a virtual target machine environment, and calling and receiving a rendering library; according to the method, the font rendering performance in the virtual target machine environment is optimized, and the overall software execution efficiency is further improved. By transferring the font rendering operation to the physical host machine environment, the method aims at solving the problems of limited resources, limited performance and the like of the virtual target machine environment, and high efficiency and high performance of font rendering are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of virtual target machines, in particular to the technical field of virtual target machines supporting font rendering, and specifically to a method for accelerating font rendering in a virtual target machine environment. Background Art

[0002] In the field of computer science, virtual machine is a technology that simulates computer systems with software. It creates a virtual computing environment on a physical computer, allowing multiple operating systems or applications to run in parallel on the same physical computer while being isolated from each other. Virtual target machine technology allows multiple operating systems or multiple applications to run simultaneously on a single hardware platform, improving hardware resource utilization and system management efficiency.

[0003] Font rendering refers to converting characters in text into visual images through computer graphics technology so that they can be displayed on the screen or printer. In computer graphics, font rendering usually involves processes such as font decoding, typesetting, and drawing, which may be computationally intensive operations due to the complexity of fonts.

[0004] Accelerating font rendering in a virtualized environment is a key technical challenge, especially in a virtual target machine environment. Virtualization technology allows a physical host to run multiple virtual target machine instances simultaneously, each of which can independently run its own operating system and applications. However, since virtual target machines need to emulate the hardware and operating system environment on the host machine, their performance is usually affected to a certain extent, especially when dealing with tasks that require a lot of computing resources, such as font rendering.

[0005] Font rendering usually involves complex graphics calculations and text processing operations, especially when processing large amounts of text or complex fonts, which can place a heavy load on system resources. In traditional virtual target environments, these operations are processed directly inside the virtual target, and due to limited resources on the virtual target, font rendering often becomes slow, affecting overall system performance and user experience.

[0006] Currently, font rendering in a virtual target environment is usually done inside the target application. The target application will have its own font rendering library to handle the font display requirements in the target application. However, due to the limited resources in the virtual target environment, its performance may not be comparable to that of the physical host. Although existing technical solutions can meet basic font rendering requirements, in some cases, due to the limited resources of the virtual target environment and the complexity of the font rendering process, there are still some problems:

[0007] Low font rendering efficiency: The performance of the virtual target machine environment may not meet the requirements of some application scenarios that require high font rendering speed, especially when large-scale text display or real-time rendering is required.

[0008] Low resource utilization: Since font rendering is completed inside the virtual target machine, the internal resource utilization of the virtual target machine environment may be low, affecting the overall system performance.

[0009] Rendering delay: Since font rendering is performed inside the virtual target machine, the delay from rendering to display may increase, affecting the user experience. Summary of the invention

[0010] Purpose of the invention: The technical problem solved by the present invention is how to accelerate font rendering in a virtual target machine environment to improve font rendering efficiency and enhance overall software execution efficiency. By transferring font rendering operations from a slower virtual target machine environment to a faster physical host machine environment, the present invention aims to solve the problem of insufficient font rendering performance in the current virtual target machine environment.

[0011] The purpose of the present invention is to provide a method for accelerating font rendering in a virtual target machine environment, so as to optimize the font rendering performance in the virtual target machine environment and further improve the overall software execution efficiency. By transferring the font rendering operation to the physical host machine environment, the present invention aims to overcome the problems of limited resources and performance in the virtual target machine environment, and achieve high efficiency and high performance of font rendering.

[0012] Technical Solution

[0013] A method for accelerating font rendering in a virtual target machine environment comprises the following steps:

[0014] Step S1: Create a virtual font API call forwarding library;

[0015] Step S2: Integrate the virtual font API call forwarding library into the target machine application running in the virtual target machine environment;

[0016] Step S3: making a virtual font API call to receive the rendering library;

[0017] Step S4: the virtual target machine environment integrates the virtual font API call receiving rendering library.

[0018] Further, the step S1 comprises:

[0019] Step S1.1: making the API function of the virtual font API call forwarding library consistent with the API function of the original font rendering library, thereby using the virtual font API call forwarding library to replace the original font rendering library;

[0020] Step S1.2: Write an API function that implements all virtual font API calls to the forwarding library;

[0021] Step S1.3: Using the development tool chain of the target machine application to be virtualized, compile all API functions into corresponding virtual font API call forwarding libraries.

[0022] Furthermore, the step S1.2 further includes:

[0023] Step S1.2.1: Filling the agreed data structure: This includes filling the API function index value, the number of parameters passed into the API function, each parameter of the API function, and the return value structure pointer into the agreed data structure;

[0024] Step S1.2.2: trigger the virtual font API to call and receive the rendering library function;

[0025] Step S1.2.3: Read the result of running the virtual font API call forwarding library function;

[0026] Step S1.2.4: If the API call to receive the rendering library function is successful, execute step S1.3; if it is unsuccessful, restart step S1.2.1;

[0027] Step S1.2.5: If the API call forwarding library function has a return value, the return value is returned to the target machine application.

[0028] Furthermore, in step S1.2.1, each parameter of the API function is agreed upon according to the number of parameters and parameter types of the font rendering library API function.

[0029] Further, the step S2 comprises:

[0030] Step S2.1: using the development tool chain of the target machine application to be virtualized, compile the virtual font API call forwarding library into a link library that can be referenced by the target machine application;

[0031] Step S2.2: Use the development tool chain of the target machine application to be virtualized to relink and generate the target machine application.

[0032] Further, the step S3 comprises:

[0033] Step S3.1: For each API function in the virtual font API call forwarding library, there is a corresponding virtual font API call receiving rendering library API function; using the development tool chain for developing virtual target machine software, the virtual font API call receiving rendering library is compiled into a link library that can be referenced by the virtual target machine software;

[0034] Step S3.2: Use the development tool chain for developing the virtual target machine to relink and generate the virtual target machine software.

[0035] Furthermore, the step S3.1 further includes:

[0036] Step S3.1.1: Read the agreed data structure and determine whether it is complete. If it is a complete structure, continue to step S3.1.2, otherwise the API function ends and returns an error value:

[0037] Step S3.1.2: Establishing an API function table capable of searching the font rendering library of the physical machine by using the API function index value as an index;

[0038] Step S3.1.3: Use the API function table to find the corresponding API function of the font rendering library;

[0039] Step S3.1.4: Fill each parameter of the API function in the agreed data structure into the corresponding parameter position of the font rendering library API function in the physical host machine;

[0040] Step S3.1.5: If the font rendering library API function has a return value, put the return value of the font rendering library API function into the return value specified position in the agreed data structure.

[0041] Furthermore, in step S3.1.1, the agreed data structure includes the API function index value, the number of parameters passed into the API function, and each parameter of the API function.

[0042] Further, the step S4 comprises:

[0043] Step S4.1: using the virtual target machine software integrated in step S3 to run the target machine application integrated in step S2;

[0044] Step S4.2: the target machine application integrated in step S2 calls the virtual font API call forwarding library produced in step S1 when running in the virtual target machine software integrated in step S3;

[0045] Step S4.3: The virtual font API call forwarding library produced in step S1 calls the font rendering library of the physical host machine in the virtual target machine through the virtual font API call forwarding library produced in step S3, thereby implementing font rendering in the physical host machine.

[0046] Beneficial Effects

[0047] The present invention improves font rendering efficiency: by forwarding font rendering in a virtual target machine environment to a physical host machine environment, the present invention can fully utilize the high-performance resources of the physical host machine environment, thereby significantly improving font rendering efficiency and accelerating text display speed.

[0048] The present invention improves the overall software execution efficiency: Since font rendering is an important part of the software execution process, the present invention further improves the overall software execution efficiency by optimizing font rendering performance, thereby enhancing the performance of the target machine application in the virtual target machine environment.

[0049] The present invention improves resource utilization: by performing font rendering operations in a physical host machine environment, the present invention can improve resource utilization in a virtual target machine environment, reduce resource waste, and thus improve the overall resource utilization efficiency of the system.

[0050] The present invention solves the rendering delay problem: accelerating font rendering can reduce the rendering delay of text display, improve the user's operation fluency and response speed in a virtual target machine environment, and thus improve the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 It is a schematic diagram of font rendering in the prior art;

[0052] Figure 2 It is a data structure diagram forwarded by the font rendering API of the present invention;

[0053] Figure 3 This is the process of the virtual font API calling the forwarding library function of the present invention;

[0054] Figure 4 This is the process of receiving the rendering library function by calling the virtual font API of the present invention;

[0055] Figure 5 It is a flow chart of the method for accelerating font rendering in a virtual target machine environment of the present invention. DETAILED DESCRIPTION

[0056] The features and illustrative embodiments of various aspects of the present invention will be described in detail below. In the detailed description below, many specific details are proposed to provide a comprehensive understanding of the present invention. However, it is obvious to those skilled in the art that the present invention can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present invention by illustrating examples of the present invention. The present invention is by no means limited to any specific settings and methods proposed below, but covers any improvements, replacements and modifications of structures, methods, devices without departing from the spirit of the present invention. In the accompanying drawings and the following description, known structures and technologies are not shown to avoid unnecessary ambiguity in the present invention.

[0057] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other, and the embodiments can refer to and quote each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0058] Embodiment 1:

[0059] A method for accelerating font rendering in a virtual target machine environment comprises the following steps:

[0060] Step S1: Create a virtual font API call forwarding library;

[0061] Step S1.1: making the API function of the virtual font API call forwarding library consistent with the API function of the original font rendering library, thereby using the virtual font API call forwarding library to replace the original font rendering library;

[0062] Step S1.2: Write an API function that implements all virtual font API calls to the forwarding library;

[0063] Step S1.2.1: Fill the agreed data structure: This includes filling the API function index value, the number of parameters passed into the API function, each parameter of the API function, and the return value structure pointer into the agreed data structure; each parameter of the API function is based on the number of parameters and parameter type agreed upon by the font rendering library API function;

[0064] Step S1.2.2: trigger the virtual font API to call and receive the rendering library function;

[0065] Step S1.2.3: Read the result of running the virtual font API call forwarding library function;

[0066] Step S1.2.4: If the API call to receive the rendering library function runs successfully, execute step S1.3; if it fails, restart step S1.2.1;

[0067] Step S1.2.5: If the API call forwarding library function has a return value, the return value is returned to the target machine application.

[0068] Step S1.3: Using the development tool chain of the target machine application to be virtualized, compile all API functions into corresponding virtual font API call forwarding libraries.

[0069] Step S2: Integrate the virtual font API call forwarding library into the target machine application running in the virtual target machine environment;

[0070] Step S2.1: using the development tool chain of the target machine application to be virtualized, compile the virtual font API call forwarding library into a link library that can be referenced by the target machine application;

[0071] Step S2.2: Use the development tool chain of the target machine application to be virtualized to relink and generate the target machine application.

[0072] Step S3: making a virtual font API call to receive the rendering library;

[0073] Step S3.1: For each API function in the virtual font API call forwarding library, there is a corresponding virtual font API call receiving rendering library API function; using the development tool chain for developing virtual target machine software, the virtual font API call receiving rendering library is compiled into a link library that can be referenced by the virtual target machine software, including:

[0074] Step S3.1.1: Read the agreed data structure and determine whether it is complete. If it is a complete structure, continue to step S3.1.2, otherwise the API function ends and returns an error value. In step S3.1.1, the agreed data structure includes the API function index value, the number of parameters passed into the API function, and each parameter of the API function;

[0075] Step S3.1.2: Establishing an API function table capable of searching the font rendering library of the physical machine by using the API function index value as an index;

[0076] Step S3.1.3: Use the API function table to find the corresponding API function of the font rendering library;

[0077] Step S3.1.4: Fill each parameter of the API function in the agreed data structure into the corresponding parameter position of the font rendering library API function in the physical host machine;

[0078] Step S3.1.5: If the font rendering library API function has a return value, put the return value of the font rendering library API function into the return value specified position in the agreed data structure.

[0079] Step S3.2: Use the development tool chain for developing the virtual target machine to relink and generate the virtual target machine software.

[0080] Step S4: The virtual target machine environment integrates the virtual font API call receiving rendering library, step S4 includes:

[0081] Step S4.1: using the virtual target machine software integrated in step S3 to run the target machine application integrated in step S2;

[0082] Step S4.2: the target machine application integrated in step S2 calls the virtual font API call forwarding library produced in step S1 when running in the virtual target machine software integrated in step S3;

[0083] Step S4.3: The virtual font API call forwarding library produced in step S1 calls the font rendering library of the physical host machine in the virtual target machine through the virtual font API call forwarding library produced in step S3, thereby implementing font rendering in the physical host machine.

[0084] Embodiment 2:

[0085] Figure 5 FIG. 1 is a flow chart of a method for accelerating font rendering in a virtual target machine environment of the present invention. Figure 5 As shown, the method for accelerating font rendering in a virtual target machine environment includes:

[0086] Step S1, creating a virtual font API call forwarding library;

[0087] Step S2, integrating the virtual font API call forwarding library into the target machine application running in the virtual target machine environment;

[0088] Step S3, making a virtual font API call to receive the rendering library;

[0089] Step S4, the virtual target machine environment integrates the virtual font API call receiving rendering library;

[0090] Embodiment 3:

[0091] : In order to solve the technical problem of accelerating font rendering in a virtual target machine environment and to achieve the purpose of improving font rendering efficiency and overall software execution efficiency, refer to Figure 1 and Figure 5 As shown, the present invention provides the following specific implementation modes:

[0092] S1. Create a virtual font API call forwarding library:

[0093] Step S1.1: Make the API function of the virtual font API call forwarding library consistent with the original font rendering library API function, so that the virtual font API call forwarding library can replace the original font rendering library; it is necessary to ensure the API function compatibility and ensure that the API function of the virtual font API call forwarding library is consistent with the original font rendering library API function to replace the original font rendering library.

[0094] In this embodiment, the integration of step S2 can be performed only after the same API function as the original font rendering library is implemented, otherwise a compilation error will occur, resulting in the failure of the integration of step S2.

[0095] Step S1.2: Write API functions that implement all virtual font API calls to the forwarding library

[0096] Write and implement all virtual font API call forwarding library API functions to ensure that all functions required for font rendering are covered.

[0097] Reference Figure 3 As shown, write the functions of the virtual font API call forwarding library for all the API interfaces used. The implementation of each virtual font API call forwarding library interface function includes the same steps:

[0098] Step S1.2.1: Fill in the agreed data structure: including the API function index value, the number of parameters passed to the API function, the various parameters of the API function and the return value structure pointer; the various parameters of the API function are agreed upon according to the number and type of parameters of the font rendering library API function.

[0099] In this step, the function in the virtual font API call forwarding library will be called to trigger the font rendering operation. The main function of this step is to pass the font rendering request to the virtual font API call receiving rendering library so as to perform the font rendering operation in the physical host environment.

[0100] Step S1.2.2: trigger the virtual font API to call and receive the rendering library function;

[0101] In this step, the font rendering operation is triggered by calling the virtual font API call receiving the rendering library function. This function will perform the corresponding font rendering task according to the parameter information in the filled data structure.

[0102] Step S1.2.3: Read the result of running the virtual font API call forwarding library function;

[0103] In this step, the return information is read from the result of running the virtual font API call forwarding library function to determine whether the font rendering operation is completed successfully.

[0104] Step S1.2.4: If the operation is successful, continue the operation; if the operation is unsuccessful, restart step S1.2.1;

[0105] In this step, the result of running the virtual font API call forwarding library function is used to determine whether the operation is successful. If the operation is successful, the subsequent steps will continue to run; if the operation is unsuccessful, the step S1.2.1 will be restarted to fill the data structure to retry the font rendering operation.

[0106] Step S1.2.5: If there is a return value, the return value is returned to the target machine application.

[0107] In this step, if the virtual font API calls the forwarding library function successfully and generates a return value, the return value is passed to the target application. This step ensures that the font rendering result can be correctly returned to the target application for subsequent display or other processing.

[0108] Step S1.3: Using the development tool chain of the target machine application to be virtualized, compile all API functions into corresponding virtual font API call forwarding libraries.

[0109] This process mainly completes the compilation of the virtual font API call forwarding library. Using the target machine application development tool chain, all API functions are compiled into a virtual font API call forwarding library that can be called by the target machine application.

[0110] Assuming that the development tool chain used by the target machine application to be virtualized is gcc-arm, the gcc-arm tool chain should be used to compile the source files of the function implementation of all virtual font API call forwarding libraries written according to the above steps into static link library files or dynamic link library files.

[0111] Step S2: Integrate the virtual font API call forwarding library into the target machine application running in the virtual target machine environment:

[0112] The virtual font API is used to call the forwarding library to replace the original font rendering library referenced by the target machine application.

[0113] By replacing the original font rendering library in the target machine application, the virtual font API call forwarding library is integrated into the target machine application, so as to subsequently call the virtual font API and realize font rendering acceleration.

[0114] Step S2.1: Using the virtual font API to call the forwarding library to replace the original font rendering library referenced by the target machine application;

[0115] In this step, you first need to replace the original font rendering library with the virtual font API call forwarding library. This involves specifying the new library file path in the source code or compilation configuration of the target machine application and ensuring that all font rendering function calls point to the new forwarding library.

[0116] By replacing the original font rendering library, the target machine application will call the font rendering function in the new forwarding library. The purpose of this is to ensure that the font rendering function is not affected after the replacement and can be smoothly integrated with the forwarding library.

[0117] Step S2.2: using the development tool chain of the target machine application to be virtualized, compile the virtual font API call forwarding library into a link library that can be referenced by the target machine application.

[0118] In this step, you first need to replace the original font rendering library with the virtual font API call forwarding library. This involves specifying the new library file path in the source code or compilation configuration of the target machine application and ensuring that all font rendering function calls point to the new forwarding library.

[0119] By replacing the original font rendering library, the target machine application will call the font rendering function in the new forwarding library. The purpose of this is to ensure that the font rendering function is not affected after the replacement and can be smoothly integrated with the forwarding library.

[0120] Step S2.3: Use the development tool chain of the target machine application to be virtualized to relink and generate the target machine application.

[0121] In this step, re-execute the link process of the target application to ensure that the forwarding library is correctly linked into the target application. This involves calling the compiler and linker, specifying the new link library path, and ensuring that the generated target application executable file includes the font rendering functions in the forwarding library.

[0122] By relinking and generating the target machine application, it is ensured that the forwarding library is correctly linked and seamlessly integrated with the application. In this way, the target machine application can smoothly call the font rendering function in the forwarding library and achieve accelerated font rendering effect at runtime.

[0123] Step S3: Create a virtual font API call to receive the rendering library, refer to Figure 4 shown.

[0124] In step S3, assuming that the development tool chain for developing the virtual target machine software is gcc-x86, gcc-x86 should be used as the development tool chain to compile the virtual font API call receiving rendering library in step S3.

[0125] Step S3.1: Each API function in the virtual font API call forwarding library has a corresponding virtual font API call receiving rendering library API function.

[0126] For each API function in the virtual font API call forwarding library, write the corresponding receiving rendering library API function. These functions will call the font rendering library in the physical host environment according to the received parameter information to perform font rendering operations.

[0127] Step S3.1.1: Read the agreed data structure and determine whether it is a complete structure. If it is, continue to execute. Otherwise, the function ends and returns an error value: including the API function index value, the number of parameters passed to the API function, and each parameter of the API function;

[0128] In this step, the parameter data structure of the virtual font API call is first read, including the API function index value, the number of incoming parameters, and the value of each parameter. Then, the parameters are checked for completeness to ensure that all necessary information is ready. If the data structure is incomplete, the font rendering request may not be processed correctly, so a completeness check is performed in this step.

[0129] Step S3.1.2: Establishing an API function table capable of searching the font rendering library of the physical machine by using the API function index value as an index;

[0130] In this step, a font rendering library API function table is created, which can be used to find the corresponding font rendering library API function by API function index value. This table is created to quickly locate and call the corresponding function of the font rendering library on the physical host machine in the virtual target machine environment.

[0131] Step S3.1.3: Use the API function table to find the corresponding API function of the font rendering library;

[0132] In this step, the API function table established in step S3.1.2 is used to search for the corresponding font rendering library API function according to the API function index value, so that the font rendering library function to be called can be accurately located in the font rendering request.

[0133] Step S3.1.4: Fill the parameters in the agreed data structure into the corresponding parameter positions of the font rendering library API function in the physical host machine;

[0134] In this step, the parameter values ​​are extracted from the parameter data structure passed in by the virtual font API call, and these parameter values ​​are filled into the corresponding parameter positions of the font rendering library API function in the physical host machine. This provides the font rendering library function with the correct parameters to perform font rendering operations.

[0135] Step S3.1.5: If the font rendering library API function has a return value, put the return value of the font rendering library API function into a specified position in the agreed data structure;

[0136] In this step, check whether the font rendering library API function has a return value. If there is a return value, put the return value into the specified position of the pre-agreed data structure for subsequent use. In this way, the execution result of the font rendering library function can be obtained from the virtual font API call, thereby completing the processing of the font rendering request.

[0137] Step S3.2: using a development tool chain for developing virtual target machine software, compile the virtual font API call receiving rendering library into a link library that can be referenced by the virtual target machine software.

[0138] The development tool chain provided by the virtual target machine software is used to compile the written receiving rendering library to generate the corresponding link library file. The receiving rendering library can then be correctly referenced and called by the virtual target machine software.

[0139] Step S3.3: Use the development tool chain for developing the virtual target machine to relink and generate the virtual target machine software.

[0140] Use the relinking tool provided by the virtual target machine software to link the previously compiled receiving rendering library to the virtual target machine software and regenerate the executable file of the virtual target machine software. In this way, the receiving rendering library is correctly integrated into the virtual target machine software and can be called and executed by the application in the virtual target machine environment.

[0141] Step S4: the virtual target machine environment integrates the virtual font API call receiving rendering library;

[0142] In step S4, the key process of transferring the virtual font rendering operation from the virtual target machine environment to the physical host machine environment is completed. The following is a summary of step S4 and some additional explanations:

[0143] Step S4.1: using the virtual target machine software integrated in step S3 to run the target machine application integrated in step S2;

[0144] After completing step S3, the obtained virtual font API call receiving rendering library is integrated with the virtual target machine software. Then, the target machine application program integrated with the virtual font API call forwarding library in step S2 is run.

[0145] Step S4.2: the target machine application integrated in step S2 calls the virtual font API call forwarding library produced in step S1 when running in the virtual target machine software integrated in step S3;

[0146] A target machine application program integrated with the virtual font API call forwarding library is run in the virtual target machine software, and it is ensured that the application program can correctly call functions in the virtual font API call forwarding library.

[0147] Step S4.3: The virtual font API call forwarding library produced in step S1 calls the font rendering library of the physical host machine in the virtual target machine through the virtual font API call forwarding library produced in step S3, thereby implementing font rendering in the physical host machine.

[0148] The virtual font API call forwarding library calls the font rendering library of the physical host machine through the virtual font API call receiving rendering library to implement font rendering.

[0149] Through this step, the virtual font API call forwarding library can pass the font rendering request to the font rendering library of the physical host machine to perform the font rendering operation. In this way, the font rendering operation will be completed in the faster physical host machine environment, thereby achieving the acceleration effect of font rendering.

[0150] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the field can easily think of various equivalent modifications or substitutions within the technical scope disclosed by the present invention, and these modifications or substitutions should all be covered within the protection scope of the present invention.

Claims

1. A method for accelerating font rendering in a virtual target machine environment, characterized in that: The following steps are involved: Step S1: Create a virtual font API call forwarding library; Step S2: Integrate the virtual font API call forwarding library into the target machine application running in the virtual target machine environment; Step S3: making a virtual font API call to receive the rendering library; Step S4: the virtual target machine environment integrates the virtual font API call receiving rendering library.

2. The method for accelerating font rendering in a virtual target machine environment according to claim 1, characterized in that: The step S1 comprises: Step S1.1: making the API function of the virtual font API call forwarding library consistent with the API function of the original font rendering library, thereby using the virtual font API call forwarding library to replace the original font rendering library; Step S1.2: Write an API function that implements all virtual font API calls to the forwarding library; Step S1.3: Using the development tool chain of the target machine application to be virtualized, compile all API functions into corresponding virtual font API call forwarding libraries.

3. The method for accelerating font rendering in a virtual target machine environment according to claim 2, characterized in that: The step S1.2 further includes: Step S1.2.1: Filling the agreed data structure: This includes filling the API function index value, the number of parameters passed into the API function, each parameter of the API function, and the return value structure pointer into the agreed data structure; Step S1.2.2: trigger the virtual font API to call and receive the rendering library function; Step S1.2.3: Read the result of running the virtual font API call forwarding library function; Step S1.2.4: If the API call to receive the rendering library function is successful, execute step S1.3; if it is unsuccessful, restart step S1.2.1; Step S1.2.5: If the API call forwarding library function has a return value, the return value is returned to the target machine application.

4. The method for accelerating font rendering in a virtual target machine environment according to claim 3, characterized in that: In step S1.2.1, each parameter of the API function is agreed upon according to the number of parameters and parameter types of the font rendering library API function.

5. The method for accelerating font rendering in a virtual target machine environment according to claim 4, characterized in that: The step S2 comprises: Step S2.1: using the development tool chain of the target machine application to be virtualized, compile the virtual font API call forwarding library into a link library that can be referenced by the target machine application; Step S2.2: Use the development tool chain of the target machine application to be virtualized to relink and generate the target machine application.

6. The method for accelerating font rendering in a virtual target machine environment according to claim 5, characterized in that: The step S3 comprises: Step S3.1: For each API function in the virtual font API call forwarding library, there is a corresponding virtual font API call receiving rendering library API function; using the development tool chain for developing virtual target machine software, the virtual font API call receiving rendering library is compiled into a link library that can be referenced by the virtual target machine software; Step S3.2: Use the development tool chain for developing the virtual target machine to relink and generate the virtual target machine software.

7. The method for accelerating font rendering in a virtual target machine environment according to claim 6, characterized in that: The step S3.1 further comprises: Step S3.1.1: Read the agreed data structure and determine whether it is complete. If it is a complete structure, continue to step S3.1.2, otherwise the API function ends and returns an error value: Step S3.1.2: Establishing an API function table capable of searching the font rendering library of the physical machine by using the API function index value as an index; Step S3.1.3: Use the API function table to find the corresponding API function of the font rendering library; Step S3.1.4: Fill each parameter of the API function in the agreed data structure into the corresponding parameter position of the font rendering library API function in the physical host machine; Step S3.1.5: If the font rendering library API function has a return value, put the return value of the font rendering library API function into the return value specified position in the agreed data structure.

8. The method for accelerating font rendering in a virtual target machine environment according to claim 7, characterized in that: In step S3.1.1, the agreed data structure includes the API function index value, the number of parameters passed into the API function, and each parameter of the API function.

9. The method for accelerating font rendering in a virtual target machine environment according to claim 8, characterized in that: The step S4 comprises: Step S4.1: using the virtual target machine software integrated in step S3 to run the target machine application integrated in step S2; Step S4.2: the target machine application integrated in step S2 calls the virtual font API call forwarding library produced in step S1 when running in the virtual target machine software integrated in step S3; Step S4.3: The virtual font API call forwarding library produced in step S1 calls the font rendering library of the physical host machine in the virtual target machine through the virtual font API call forwarding library produced in step S3, thereby implementing font rendering in the physical host machine.