Automatic font collection and missing font supplementation method applied to DWG drawing
By establishing a font storage space and information database on the server side, and combining it with the font management module on the user side, missing fonts are automatically parsed and installed, solving the font compatibility problem of DWG files in different environments, and improving design efficiency and the accuracy of data sharing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-30
- Publication Date
- 2026-04-10
AI Technical Summary
In existing technologies, DWG files have significant font compatibility issues in scenarios such as collaborative design, remote collaboration, and file handover, resulting in abnormal text display, affecting design efficiency and data integrity, and lacking automatic, real-time, and dynamic font management solutions.
A font file storage space and information database are established on the server side. The font management module is loaded into the computer-aided design software on the user side to automatically parse the font identification information of the DWG file, upload missing fonts to the server and install them locally, thereby realizing the automatic collection and management of fonts.
It enables automated font management of DWG files in different environments, improves collaborative design efficiency and data sharing accuracy, solves display anomalies caused by missing fonts, and is suitable for various deployment environments such as cloud servers, wide area networks, and local area networks.
Smart Images

Figure CN121833989A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The embodiment of the application relates to the technical field of computer-aided design, and particularly relates to a font automatic collection and missing font supplement method applied to a DWG drawing. BACKGROUND
[0002] CAD (Computer Aided Design) technology has been widely applied to multiple industry fields such as architecture, machinery, electronics and engineering manufacturing, and has become an indispensable tool in modern design and production processes. The design file generated by CAD software is usually stored in the DWG format, and the file of this format not only contains geometric graphic information, but also often embeds various text contents such as text labels, annotation instructions and the like, and the display of these texts depends on specific font files.
[0003] In actual application, the DWG file often needs to be transmitted and shared between different computers, different operating systems or different users. Since the font file is usually only stored in the local computer where the file is generated, when the DWG file is opened on other computers, if the corresponding font file is missing in the system, the text content cannot be normally displayed, and problems such as garbled code, font replacement, character misplacement or text overflow occur, which seriously affects the readability of the drawing and the accuracy of the design.
[0004] At present, the main way to solve the font missing problem still depends on manual operation, for example:
[0005] Manual copying of font files: the user needs to manually find and copy the missing font files from the source computer or network location to the local font directory before opening the DWG file, which is tedious and prone to errors;
[0006] Establishment of a centralized font library: some enterprises or teams try to establish a shared font library, but manual maintenance and updating are required, new fonts cannot be responded to in real time, and font version management is difficult;
[0007] Use of font mapping or replacement function: some CAD software provides font mapping or replacement mechanism, but often leads to distortion of typesetting or loss of information, and cannot completely restore the design intention.
[0008] In addition, some automatic matching schemes based on template library or preset font in the prior art are also available, but these schemes usually need to establish a complete font database in advance, cannot adapt to the dynamic addition of font demand, and have limited applicability in cross-platform and cross-network environments.
[0009] Therefore, there is a lack of a systematic solution capable of automatically, real-timely and dynamically collecting, managing and distributing CAD font files in the prior art, resulting in that there are still significant font compatibility problems in DWG files in scenarios such as collaborative design, remote collaboration and file handover, which affects design efficiency and data integrity. SUMMARY
[0010] To this end, an embodiment of the present application provides a font automatic collection and missing font supplement method applied to a DWG drawing, to solve the technical problem of significant font compatibility of existing DWG files in scenarios such as collaborative design, remote collaboration and file handover.
[0011] To achieve the above-mentioned purpose, an embodiment of the present application provides the following technical solution:
[0012] An embodiment of the present application provides a font automatic collection and missing font supplement method applied to a DWG drawing, comprising:
[0013] establishing a font file storage space and an associated font information database on a server side;
[0014] loading and starting a font management module in computer-aided design software on a first user side;
[0015] in response to the first user side opening a first DWG drawing file, the font management module parses the file to obtain identification information of all font files used by the file;
[0016] the font management module locates corresponding font files stored locally according to the identification information, and uploads the font files to the storage space on the server side, and creates corresponding records in the font information database;
[0017] in response to a second user side opening the first DWG drawing file, the font management module of the second user side obtains font identification information required by the file and compares with a local font library;
[0018] if it is found that the required font file is missing locally, the font management module of the second user side downloads corresponding font files from the storage space on the server side according to the identification information of the missing font files, and automatically installs the font files to the local.
[0019] Further, the font management module is a plug-in integrated in the computer-aided design software or a control program running independently.
[0020] Further, the font management module obtains name and format information of the font files by parsing TextStyleTable and TextStyleTableRecord data tables in the DWG drawing file.
[0021] Further, the format of the font file includes at least one of *.SHX, *.TTF and *.TTC formats.
[0022] Further, the method further comprises:
[0023] In response to any user terminal editing and saving a DWG drawing file, the font management module of the user terminal reanalyzes the saved file to obtain updated font identification information;
[0024] The updated font identification information is compared with the font information database of the server terminal;
[0025] If it is found through the comparison that the font does not exist in the database, the font is a new font, and the font management module locates a corresponding font file stored locally according to the identification information, and uploads the font file to the storage space of the server terminal, and creates a corresponding record in the font information database, uploads the new font file to the server and updates the database.
[0026] Further, the record of the font information database at least includes font file name, file format and storage path association information.
[0027] Further, the server terminal is a cloud server, a wide area network server or a local area network server.
[0028] Further, downloading a corresponding font file from the storage space of the server terminal and automatically installing the font file to the local terminal, including: the automatic installation is to silently deploy the downloaded font file to a font directory designated by an operating system or CAD software.
[0029] The embodiment of the application has the following advantages:
[0030] The embodiment of the application establishes a font storage space and a database on the server terminal, loads a font management module in CAD software on the user terminal, automatically analyzes a file to obtain font identification when a user opens a DWG drawing, uploads a locally missing font to the server for storage, and records in the database, automatically compares, downloads and silently installs a locally missing font when another user opens the same drawing, and reanalyzes and uploads a newly added font after the user edits and saves the drawing, to realize dynamic updating of the database. The application realizes automatic collection, centralized management and on-demand distribution of font files, completely solves the problem of drawing display abnormalities caused by missing fonts, significantly improves the efficiency of collaborative design and the accuracy of data sharing, and is suitable for various deployment environments such as cloud servers, wide area networks and local area networks. BRIEF DESCRIPTION OF DRAWINGS
[0031] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following will briefly introduce the drawings required in the embodiments or prior art description. Obviously, the drawings in the following description are only exemplary, and for those skilled in the art, other drawings can also be obtained from the provided drawings without creative labor.
[0032] The structures, proportions, sizes, etc. shown in the specification are only used to cooperate with the content disclosed in the specification, so that those skilled in the art can understand and read, and are not used to limit the conditions that the present application can be implemented, so they do not have technical significance. Any modification of structure, change of proportion relationship or adjustment of size, without affecting the effect and purpose that the present application can produce, should still fall within the scope of the technical content disclosed by the present application.
[0033] Figure 1 A network architecture schematic diagram of a font automatic collection and missing font supplement method applied to a DWG drawing is provided for an embodiment of the present application.
[0034] Figure 2 A work flow schematic diagram of a font automatic collection and missing font supplement method applied to a DWG drawing is provided for an embodiment of the present application. DETAILED DESCRIPTION
[0035] The embodiments of the present application are described below by specific specific embodiments, and those skilled in the art can easily understand other advantages and effects of the present application from the content disclosed in the specification. Obviously, the described embodiments are part of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of the present application.
[0036] As a computer-aided design, CAD (Computer Aided Design) is an important application field of computer technology. The DWG data format file is the result file of CAD software. The general users can use it to output and share the design graphics rich in information. With the wide application of CAD drawing software in various industries in China, the font files required in the DWG file are also widely created. However, these font files are only saved in the local corresponding file directory of the computer where the DWG file is located. When the DWG file is opened in other PC or terminal, due to the change of environment, the related text content may not be normally displayed due to the lack of corresponding font, and abnormal situations such as garbled code, font deformation, and graphic displacement may occur.
[0037] In order to solve these abnormal situations, a large amount of manual work is required to find the corresponding font copy to the current application end to solve. At the same time, a large amount of manual time is required to recheck whether there are still abnormal problems caused by font missing or incorrect in the file.
[0038] Therefore, a large number of practitioners also propose to rely on manual establishment of font template library, and corresponding download from the template library according to the needs. When some new font files are generated and are not recorded in the template library, the same problem caused by font missing will still occur.
[0039] In view of the problems in the prior art, the present application provides a CAD font collection and automatic download and installation of missing fonts with simpler principle and higher automation. The embodiment of the present application can be applied to cloud servers, wide area network servers and local area network internal storage.
[0040] The embodiment of the present application discloses a font automatic collection and missing font supplement method applied to DWG drawings, which comprises the following steps:
[0041] Loading and starting a font management module in the computer-aided design software of the first user end;
[0042] In response to the first user end opening a first DWG drawing file, the font management module parses the file to obtain the identification information of all font files used by the file;
[0043] The font management module locates the corresponding font file stored locally according to the identification information, and uploads it to the storage space of the server end, and creates a corresponding record in the font information database;
[0044] In response to the second user end opening the first DWG drawing file, the font management module of the second user end obtains the font identification information required by the file and compares it with the local font library;
[0045] If the comparison finds that the required font file is missing locally, the font management module of the second user end downloads the corresponding font file from the storage space of the server end according to the identification information of the missing font, and automatically installs it to the local.
[0046] Step S1: creating a database and a storage space of font files in a cloud service or a local area network server;
[0047] Step S2: when user A starts the CAD software, the font collector is automatically loaded and started;
[0048] Step S3: When the user A opens the DWG file A.DWG through the CAD software, the font collector starts to parse the current DWG file A.DWG internal data TextStyleTable and TextStyleTableRecord two groups of data to obtain all the font names and file formats (CAD software commonly used font is *.SHX; *.TIF, *.TTC format file) used by the current file
[0049] Step S4: The font collector automatically obtains the storage path of these files in the current application end according to the obtained font name and file format, and starts uploading to the background storage (cloud server, wide area network server, local area network server);
[0050] Step S5: When the font files are uploaded one by one, the corresponding file name and file format will also be recorded in the background database;
[0051] Step S6: When the DWG file A.DWG is transmitted to another user B, the user B opens the A.DWG file with the CAD software drawing installed with the font collection plug-in controller, and the plug-in will automatically search whether the application end of the user B contains the above-mentioned font files, if there is no corresponding font file, the control will automatically download the corresponding file from the server storage end and automatically install.
[0052] Step S7: When the user B edits the A.DWG file and applies a new font, after executing the save and close command, the font collection control will compare the TextStyleTable and TextStyleTableRecord data with the existing data in the backend database (cloud server, wide area network server, local area network server), if new data that does not exist in the current database record is found, the corresponding font file will be automatically collected and uploaded to the server and the new database record will be automatically inserted.
[0053] Step S8: When the user B opens a new DWG file B.DWG, the font collector will first perform the operation in step S3, and then compare with the background database record table to check whether there is a new font, if not, the file will be opened, if new text information is found in the background database, it will be automatically collected, stored, and a new record will be inserted in the database.
[0054] The present application further improves the following points compared with other existing technologies:
[0055] 1) No manual standard library needs to be established, but when the user opens the DWG file, the file carrier is automatically collected and uploaded to the backend service and the database record is automatically formed;
[0056] 2) Further optimize the collection speed of font files, only for common types directly for collection;
[0057] 3) Further optimize the font download and application process, without establishing any cache data or performing other additional renaming, moving files and other additional operations, directly recognized by the application body;
[0058] 4) Further consider the relationship between font files and drawing content replacement from the early design stage, and perform secondary font automatic collection during drawing saving and closing process, further avoiding the error problems caused by manual replacement or omission due to newly added fonts.
[0059] The application adopts automatic collection of font files according to drawings to store in the background server and automatically create database records.
[0060] The preconditions of manually creating standard font file library and related database are solved, and the current font file is automatically collected whether it is missing in the background record during opening, editing and saving of the DWG file. When the DWG file is opened, the missing font phenomenon is found, and the corresponding font is automatically downloaded from the background, and the installation is recognized without other additional operations. The application solves the error problem caused by the missing font of the DWG file through automatic collection, recognition, download and application from the technical end.
[0061] The specific network architecture is shown in Figure 1 In order to facilitate the better application of various users and facilitate automatic collection and storage, storage space and background database need to be set in the background center server. The server can be a cloud server, a wide area network server and a local area network server. As long as the font service control in the CAD software (foreign brand CAD software and domestic CAD software) can start, it can interact with the storage space and database of the background server to realize automatic collection and automatic download and installation of font files.
[0062] Reference Figure 2 , Figure 2 Combined with the actual application scene, three use cases are described as follows:
[0063] The operation steps of the first process are as follows:
[0064] Step 1: On the basis of establishing storage space and creating database in the background server, the user opens and reads the DWG file in the format supported by the CAD software to obtain the data information contained in the file;
[0065] Step two: font control analysis of the current DWG TextStyleTable, TextStyleTableRecord two groups of data to get the current DWG file required font file name and file type;
[0066] Step three: the parsed data and the background database record comparison, to see if there are no records of the current database font files; if not so the program will not only any operation, so there are new font files, the program will perform step four
[0067] Step four: the existence of new font files, according to the data parsed out of the file storage path, find the font file.
[0068] Step five: the font file upload to the server background storage operation, while automatically in the database corresponding storage table to create corresponding data records. In the specific application example corresponding database table structure as follows:
[0069] Field name Remark Type ID Data record ID serial number Integer type, self-increasing File_Name Font file name String type
[0070] Sub-process two operation steps as follows:
[0071] Step one: the user based on CAD software to edit the DWG drawing modification, execute the save close command;
[0072] Step two: font control analysis of the current DWG TextStyleTable, TextStyleTableRecord two groups of data to get the current DWG file required font file name and file type;
[0073] Step three: the parsed data and the background database record comparison, to see if there are no records of the current database font files; if not so the program will not only any operation, so there are new font files, the program will perform step four;
[0074] Step four: the existence of new font files, according to the data parsed out of the file storage path, find the font file.
[0075] Step five: the font file upload to the server background storage operation, while automatically in the database corresponding storage table to create corresponding data records.
[0076] Sub-process three operation steps as follows:
[0077] Step one: the user through the CAD software to open read its support format DWG file, get the data information contained in the file;
[0078] Step two: font control analysis of the current DWG TextStyleTable, TextStyleTableRecord two groups of data to obtain the current DWG file required font file name and file type;
[0079] Step three: according to the analysis data to find out whether there is a corresponding font file, if not so the program does not perform any operation, complete file opening, normal load font display content; so found no font file then step four
[0080] Step four: the missing font information to the database for application query, find the corresponding font file.
[0081] Step five: automatically download font file to local and silent installation;
[0082] Step six: DWG file opening, load corresponding font, content display correctly.
[0083] Although, in the above, the present application has been described in detail by general description and specific embodiments, but on the basis of the present application, some modifications or improvements can be made, which is obvious to those skilled in the art. Therefore, on the basis of not deviating from the spirit of the present application, these modifications or improvements made, all belong to the scope of the present application claimed.
Claims
1. A method for automatically collecting fonts and supplementing missing fonts in DWG drawings, characterized in that, The method includes: Establish font file storage space and associated font information database on the server side; The font management module is loaded and started in the computer-aided design software on the first user's end; In response to the first user opening the first DWG drawing file, the font management module parses the file and obtains the identification information of all font files used by it; The font management module locates the corresponding font file stored locally based on the identification information, uploads it to the storage space on the server, and creates a corresponding record in the font information database. In response to the second user terminal opening the first DWG drawing file, the font management module of the second user terminal obtains the font identification information required for the file and compares it with the local font library; If the comparison reveals that the required font file is missing locally, the font management module of the second user terminal downloads the corresponding font file from the storage space of the server based on the identification information of the missing font and automatically installs it locally.
2. The method for automatic font collection and missing font supplementation applied to DWG drawings as described in claim 1, characterized in that, The font management module is either a plug-in integrated into the computer-aided design software or a stand-alone control program.
3. The method for automatic font collection and missing font supplementation applied to DWG drawings as described in claim 2, characterized in that, The font management module obtains the name and format information of the font file by parsing the TextStyleTable and TextStyleTableRecord data tables in the DWG drawing file.
4. The method for automatic font collection and missing font supplementation applied to DWG drawings as described in claim 3, characterized in that, The font file format includes at least one of *.SHX, *.TTF, and *.TTC formats.
5. The method for automatic font collection and missing font supplementation applied to DWG drawings as described in claim 1, characterized in that, The method further includes: In response to any user terminal editing and saving a DWG drawing file, the font management module of the user terminal re-parses the saved file and obtains the updated font identification information; The updated font identifier information is compared with the font information database on the server. If the comparison finds that a font does not exist in the database, then the font is a new font. The font management module locates the corresponding font file stored locally based on the identification information and uploads it to the storage space on the server. At the same time, it creates a corresponding record in the font information database, uploads the new font file to the server, and updates the database.
6. The method for automatic font collection and missing font supplementation applied to DWG drawings as described in claim 1, characterized in that, The records in the font information database include at least the font file name, file format, and storage path association information.
7. The method for automatic font collection and missing font supplementation applied to DWG drawings as described in claim 1, characterized in that, The server can be a cloud server, a wide area network server, or a local area network server.
8. The method for automatic font collection and missing font supplementation applied to DWG drawings as described in claim 1, characterized in that, Download the corresponding font file from the server's storage space and automatically install it locally, including: the automatic installation is to silently deploy the downloaded font file to the font directory specified by the operating system or CAD software.
Citation Information
Patent Citations
CAD font file cloud storage and file missing font automatic installation method
CN114021221A
Shared primitive community management method and system based on CAD primitives and medium
CN115809494A
CAD (Computer Aided Design) drawing watching method and device supporting cross-platform font configuration, equipment and medium
CN120995982A
Method for digitally signing and up- and downloading fonts
EP2455867A1