CN114237407A - Font icon processing method and device and computer readable storage medium - Google Patents

Font icon processing method and device and computer readable storage medium Download PDF

Info

Publication number
CN114237407A
CN114237407A CN202111545493.3A CN202111545493A CN114237407A CN 114237407 A CN114237407 A CN 114237407A CN 202111545493 A CN202111545493 A CN 202111545493A CN 114237407 A CN114237407 A CN 114237407A
Authority
CN
China
Prior art keywords
font
icon
font icon
file
folder
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111545493.3A
Other languages
Chinese (zh)
Inventor
顾凌云
郭志攀
王伟
刘兴康
陈波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Bingjian Information Technology Co ltd
Original Assignee
Nanjing Bingjian Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing Bingjian Information Technology Co ltd filed Critical Nanjing Bingjian Information Technology Co ltd
Priority to CN202111545493.3A priority Critical patent/CN114237407A/en
Publication of CN114237407A publication Critical patent/CN114237407A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/02Input arrangements using manually operated switches, e.g. using keyboards or dials
    • G06F3/023Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
    • G06F3/0233Character input methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04817Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance using icons

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The font icon processing method and device and the computer readable storage medium relate to the technical field of icon processing, each font icon is included in a font icon template through the font icon template in a vector graphic format, and the target font icon is displayed by calling the target font icon in the font icon template. When a font icon is newly added, only the downloaded vector graphic format file of the font icon needs to be automatically introduced into the font icon template through a loading program, and meanwhile, the incremental font icon management method can not cause the problem of later maintenance caused by the loss of the font icon.

Description

Font icon processing method and device and computer readable storage medium
Technical Field
The present application relates to the field of icon processing technologies, and in particular, to a font icon processing method and apparatus, and a computer-readable storage medium.
Background
Font icons are mostly used in the existing front-end project in a type name definition icon (font class) mode, all font icons used in the development project are packaged into font files, the font files are introduced into the project, and the corresponding font icons are selected and the class names are obtained. When the font icon is used in the class name definition icon mode, after the first-stage development of the project is finished, and when the second-stage development of the project is started in a later period of time, new font icons are inevitably added to newly added development requirements, the class name definition icon mode needs to pack font files of the font icons in a full amount, even if the new requirements only need to add one font icon, and a front-end developer needs to fuse the old font icons and the new font icons and repackage the fused font icons to generate one font file. Moreover, if the font icon management is not well done, updating the font file becomes a difficult thing under the condition that the font icon at the previous stage is lost, and the result is unacceptable.
Disclosure of Invention
In order to overcome at least the above-mentioned deficiencies in the prior art, the present application provides a font icon processing method, apparatus and computer-readable storage medium for solving the above-mentioned technical problems.
In a first aspect, an embodiment of the present application provides a font icon processing method, which is applied to a computer device, and the method includes:
collecting font icons required by a target development project, and acquiring vector graphic format files of the font icons;
installing a loading program of the vector graphic sprite, and generating a font icon template of the vector graphic format file of the font icon through the loading program;
packaging the font icon template into a component, and exposing the packaged component as a global component;
and calling a target font icon in the global component, and displaying the called target font icon.
According to the scheme, each font icon is included in the font icon template through the font icon template in the vector graphic format, and the target font icon is displayed by calling the target font icon in the font icon template. When a font icon is newly added, only the downloaded vector graphic format file of the font icon needs to be automatically introduced into the font icon template through a loading program, and meanwhile, the incremental font icon management method can not cause the problem of later maintenance caused by the loss of the font icon.
In a possible implementation manner, the step of collecting font icons required by the target development project and obtaining a vector graphics format file of the font icons includes:
collecting font icons required by the target development project;
acquiring a vector graphic format file of each font icon;
and creating a first folder under the directory corresponding to the target development project, and putting the vector graphic format file of the font icon into the first folder.
In one possible implementation manner, the step of installing a loader of the vector graphics sprite, and generating a font icon template of the vector graphics format file of the font icon by the loader includes:
installing a loading program of a vector graphic sprite;
creating a configuration file, and configuring the dynamic introduction authority of the vector graphic format file of the font icon in the first folder through the configuration file;
introducing all vector graphics format files in the first folder through a dynamic introduction function in the loading program;
and executing all vector graphic format files in the introduced first folder to generate the font icon template.
In a possible implementation manner, the step of creating a configuration file, and configuring the dynamic import permission of the vector graphics format file of the font icon in the first folder through the configuration file, includes:
creating a configuration file under a directory corresponding to the target development project, wherein the configuration file is used for configuring the dynamic introduction permission of the loader to a vector graphic format file of the font icon in the first folder;
the step of importing all the files in the vector graphics format in the first folder through the dynamic import function in the loader comprises:
creating a storage file under a directory corresponding to the target development project, and putting all vector graphics format files dynamically introduced into the first folder into the storage file;
the step of executing all vector graphics format files in the introduced first folder to generate the font icon template includes:
and calling the storage file through the entry file of the target development project, executing automatic introduction of all vector graphic format files in the first folder, and generating the font icon template.
In one possible implementation manner, the step of encapsulating the font icon template as a component and exposing the encapsulated component as a global component includes:
newly building a new file under the component folder, and packaging the font icon template to obtain the component;
introducing the component in an entry file of the target development project and exposing the component as a global component.
In a second aspect, an embodiment of the present application further provides a font icon processing apparatus, which is applied to a computer device, and the apparatus includes:
the system comprises a collecting and obtaining module, a vector graphic format file and a display module, wherein the collecting and obtaining module is used for collecting font icons required by a target development project and obtaining the vector graphic format file of the font icons;
the installation and generation module is used for installing a loading program of the vector graphic sprite and generating a font icon template of the vector graphic format file of the font icon through the loading program;
the packaging module is used for packaging the font icon template into a component and exposing the packaged component as a global component;
and the calling and displaying module is used for calling the target font icon in the global component and displaying the called target font icon.
In one possible implementation manner, the collection and acquisition module is configured to:
collecting font icons required by the target development project;
acquiring a vector graphic format file of each font icon;
and creating a first folder under the directory corresponding to the target development project, and putting the vector graphic format file of the font icon into the first folder.
In one possible implementation, the installation and generation module is configured to:
installing a loading program of a vector graphic sprite;
creating a configuration file, and configuring the dynamic introduction authority of the vector graphic format file of the font icon in the first folder through the configuration file;
introducing all vector graphics format files in the first folder through a dynamic introduction function in the loading program;
and executing all vector graphic format files in the introduced first folder to generate the font icon template.
In a possible implementation manner, the installation and generation module is specifically configured to:
creating a configuration file under a directory corresponding to the target development project, wherein the configuration file is used for configuring the dynamic introduction permission of the loader to a vector graphic format file of the font icon in the first folder;
creating a storage file under a directory corresponding to the target development project, and putting all vector graphics format files dynamically introduced into the first folder into the storage file;
and calling the storage file through the entry file of the target development project, executing automatic introduction of all vector graphic format files in the first folder, and generating the font icon template.
In a third aspect, an embodiment of the present application provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are executed, the instructions cause a computer to execute the font icon processing method in the first aspect or any one of the possible implementation manners of the first aspect.
Based on any one of the aspects, firstly, font icons required by a target development project are collected, and a vector graphic format file of the font icons is obtained; then, installing a loading program of the vector graphic sprite, and generating a font icon template of the vector graphic format file of the font icon through the loading program; then, packaging the font icon template into a component, and exposing the packaged component as a global component; and finally, calling a target font icon in the global component, and displaying the called target font icon. And each font icon is included in the font icon template through the font icon template in the vector graphic format, and the target font icon is displayed by calling the target font icon in the font icon template. When a font icon is newly added, only the downloaded vector graphic format file of the font icon needs to be automatically introduced into the font icon template through a loading program, and meanwhile, the incremental font icon management method can not cause the problem of later maintenance caused by the loss of the font icon.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that need to be called in the embodiments are briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a schematic flowchart of a font icon processing method according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating a sub-step of step S102 in FIG. 1;
FIG. 3 is a schematic diagram of a display interface provided in an embodiment of the present application;
fig. 4 is a functional module schematic diagram of a font icon processing apparatus according to an embodiment of the present application;
fig. 5 is a schematic hardware structure diagram of a computer device according to an embodiment of the present application.
Detailed Description
The present application will now be described in detail with reference to the drawings, and the specific operations in the method embodiments may also be applied to the apparatus embodiments or the system embodiments.
To overcome the disadvantages mentioned in the background art, the inventor provides the following solutions, please refer to fig. 1, fig. 1 is a schematic flow chart of a font icon processing method provided in an embodiment of the present application, the font icon processing method provided in this embodiment may be executed by a computer device, and for convenience of describing the technical solution of the present application, the following describes in detail the flow steps of the font icon processing method with reference to fig. 1.
And step S101, collecting font icons required by the target development project and acquiring vector graphic format files of the font icons.
In the embodiment of the present application, step S101 may be implemented in the following manner.
Firstly, collecting font icons required by a target development project;
then, obtaining a vector graphics format file (svg file) of each font icon;
and finally, creating a first folder under the directory corresponding to the target development project, and putting the vector graphic format file of the font icon into the first folder.
The specific process may be that font icons required by the target development project are collected, svg files of each font icon are obtained, folder fonts and subfolder fonts/svg (first folder) are newly created under an vue3 project directory structure src- > assets folder corresponding to the target development project, and all the svg files generated above are placed into the fonts/svg.
It can be understood that when a font icon is newly added, a vector graphics format file (svg file) of the newly added font icon can also be put into the fonts/svg.
And step S102, installing a loading program of the vector graphic sprite, and generating a font icon template of the vector graphic format file of the font icon through the loading program.
In the embodiment of the present application, please refer to fig. 2, fig. 2 illustrates a flow diagram of sub-steps of step S102 in fig. 1, and step S102 may be implemented by the following sub-steps.
And a substep S1021, installing a loading program of the vector graphic sprite.
The command line run code "npm isvg-sprite-loader-D" may be opened under the root directory of the target development project, the dependent svg-sprite-loader installed, and the dependent svg-sprite-loader may automatically plug the code of the svg file into a single symbol label, where symbol is labeled as a font icon template, and symbol is actually similar to a "movie clip", or "element" in Flash. If the svg element is considered as a stage, then symbol is an assembled element on the stage, and these one-by-one elements are an svg icon that we will use. By relying on svg-sprite-loader to automatically generate symbol elements in batches, a great deal of manual operation can be saved.
In this sub-step, the dependent SVG-sprite-loader can be used to create a webpack loader for SVG sprites and can automatically generate the imported SVG file as a symbol label whose id is the name of the font icon if not specified specifically. It will eventually embed such a svg in your html, and the following code can be used to use the icon:
<use xlink:href="#symbolId"></use>
wherein the use is used for taking a node from the inside of the svg file, cloning it, and outputting it elsewhere.
And a substep S1022, creating a configuration file, and configuring the dynamic introduction authority of the vector graphics format file of the font icon in the first folder through the configuration file.
And creating a configuration file under a corresponding directory of the target development project, wherein the configuration file is used for configuring the dynamic introduction authority of the loading program to the vector graphic format file of the font icon in the first folder.
Specifically, a new file vue.config.js is created, the build environment is configured by the file vue.config.js, and on the premise that the dependency svg-sprite-loader is installed currently, the dependency svg-sprite-loader needs to be loaded into the configuration of the webpack, specifically, the following code can be written into the file vue.config.js to implement:
Figure BDA0003415620550000081
Figure BDA0003415620550000091
wherein, vue.config.js is an optional configuration file, and if the file exists in the root directory of the item, the file is automatically read and loaded by @ vue/cli-service. In the above code, we delete the default processing of the svg file, and then process all svg files under the corresponding svg directory by relying on the svg-sprite-loader, so as to generate the corresponding symbol elements, and assign different symbol ids to each symbol element according to the respective file names.
Through the steps, the dynamic introduction authority of the vector graphic format file of the font icon in the first folder can be configured, if the configuration is carried out, all the svg files under the corresponding svg directory can be processed by relying on the svg-write-loader, and the corresponding font icon template is generated.
In the sub-step S1023, all the vector graphics format files in the first folder are imported by the dynamic import function in the loader.
And creating a storage file under the directory corresponding to the target development project, and putting all vector graphics format files dynamically introduced into the first folder into the storage file.
Specifically, a folder index is created under a directory corresponding to the target development project, and the following two lines of codes are filled in:
const load=require.context("./svg",false,/\.svg$/);
load.keys().map(load);
the two lines of codes mainly use a require.context function in webpack, and can automatically introduce a file module to dynamically introduce all files ending in svg under fonts/svg folders.
And a substep S1024 of executing all vector graphic format files in the introduced first folder to generate a font icon template.
And calling a storage file through the entry file of the target development project, executing automatic introduction of all vector graphic format files in the first folder, and generating a font icon template.
Specifically, calling folder index. js at the entry file main. js of the project, performs automatic import of all svg files (the code is as follows):
import "@/assets/fonts/index"; // performing automatic import
Js by automatically introducing the svg file in the folder index.
Step S103, packaging the font icon template into a component, and exposing the packaged component as a global component.
Firstly, a new file is newly created under a component folder, and the font icon template is packaged to obtain the component.
Then, the component is introduced in an entry file of the target development project and is exposed as a global component.
Specifically, by the processing of step S102, all the font icons have been called anywhere in the item, and the following code is filled in the page using the font icons: a character string formed by splicing the # icon-prefix and the corresponding file name under fonts/svg is endowed with xlink which is the attribute of href, a font icon corresponding to the file is rendered,
<svg:class="svgClass"aria-hidden="true">
href ═ icon-hash "/> <! Using an icon >
</svg>
Where the icon is called each time the code needs to be written, to further simplify the call, an vue file may be created under the components folder to encapsulate the component, the code being as follows:
<template>
<svg:class="svgClass"aria-hidden="true">
<use:xlink:href="iconName"></use>
</svg>
</template>
finally, the component is introduced into the entry file, the component is exposed to be a global component, and a developer can call the target font icon which the developer wants to use on any page.
And step S104, calling the target font icon in the global component, and displaying the called target font icon.
Specifically, the invocation of the target font icon may be implemented by code, such as the code invoking the "eye" font icon as follows:
<svg-icon icon-name=”eye”></svg-icon>
the value of Icon-name is the file name of svg, and the final page rendering result can refer to fig. 3.
In the font icon processing method provided in the foregoing embodiment, each font icon is included in the font icon template through the font icon template in the vector graphics format, and the target font icon is displayed by calling the target font icon in the font icon template. When a font icon is newly added, only the downloaded vector graphic format file of the font icon needs to be automatically introduced into the font icon template through a loading program, and meanwhile, the incremental font icon management method can not cause the problem of later maintenance caused by the loss of the font icon.
Referring to fig. 4, fig. 4 is a schematic diagram of functional modules of a font icon processing apparatus according to an embodiment of the present disclosure, in this embodiment, the font icon processing apparatus 20 may be divided into the functional modules according to a method embodiment executed by a computer device, that is, the following functional modules corresponding to the font icon processing apparatus 20 may be used to execute the method embodiments executed by the computer device. The font-based icon processing apparatus 20 may include a collecting and acquiring module 21, an installing and generating module 22, an encapsulating module 23, and a calling and displaying module 24, wherein the functions of the functional modules of the font-based icon processing apparatus 20 are described in detail below.
The collecting and obtaining module 21 is configured to collect font icons required by the target development project, and obtain a vector graphics format text of the font icons.
In this embodiment, the collecting and acquiring module 21 is specifically configured to:
collecting font icons required by the target development project;
acquiring a vector graphic format file of each font icon;
and creating a first folder under the directory corresponding to the target development project, and putting the vector graphic format file of the font icon into the first folder.
And the installation and generation module 22 is used for installing a loading program of the vector graphic sprite, and generating the font icon template of the vector graphic format file of the font icon through the loading program.
In this embodiment, the installation and generation module 22 is specifically configured to:
installing a loading program of a vector graphic sprite;
creating a configuration file, and configuring the dynamic introduction authority of the vector graphic format file of the font icon in the first folder through the configuration file;
introducing all vector graphics format files in the first folder through a dynamic introduction function in the loading program;
and executing all vector graphic format files in the introduced first folder to generate the font icon template.
And the packaging module 23 is configured to package the font icon template into a component, and expose the packaged component as a global component.
In this embodiment, the installation and generation module 22 is specifically configured to:
creating a configuration file under a directory corresponding to the target development project, wherein the configuration file is used for configuring the dynamic introduction permission of the loader to a vector graphic format file of the font icon in the first folder;
creating a storage file under a directory corresponding to the target development project, and putting all vector graphics format files dynamically introduced into the first folder into the storage file;
and calling the storage file through the entry file of the target development project, executing automatic introduction of all vector graphic format files in the first folder, and generating the font icon template.
And the calling and displaying module 24 is configured to call the target font icon in the global component, and display the called target font icon.
It should be noted that the division of the modules in the above apparatus or system is only a logical division, and the actual implementation may be wholly or partially integrated into one physical entity or may be physically separated. And these modules can be implemented in the form of software (e.g., open source software) that can be invoked by a processor; or may be implemented entirely in hardware; and part of the modules can be realized in the form of calling software by a processor, and part of the modules can be realized in the form of hardware. For example, the installation and generation module 22 may be implemented by a single processor, for example, the installation and generation module may be stored in a memory of the device or system in the form of program codes, and a certain processor of the device or system calls and executes the functions of the installation and generation module 22, and the implementation of other modules is similar, and will not be described herein again. In addition, the modules can be wholly or partially integrated together or can be independently realized. The processor described herein may be an integrated circuit with signal processing capability, and in the implementation process, each step or each module in the above technical solutions may be implemented in the form of an integrated logic circuit in the processor or a software program executed.
Referring to fig. 5, fig. 5 is a schematic diagram illustrating a hardware structure of a computer device 10 for implementing the font icon processing method according to the embodiment of the present disclosure, where the computer device 10 may be implemented on a cloud server. As shown in fig. 5, computer device 10 may include a processor 11, a computer-readable storage medium 12, a bus 13, and a communication unit 14.
In a specific implementation process, at least one processor 11 executes computer-executable instructions (for example, modules included in the font icon processing apparatus 20 shown in fig. 4) stored in the computer-readable storage medium 12, so that the processor 11 may execute the font icon processing method according to the above method embodiment, where the processor 11, the computer-readable storage medium 12, and the communication unit 14 are connected through the bus 13, and the processor 11 may be configured to control data reception and transmission of the communication unit 14.
For the specific implementation process of the processor 11, reference may be made to the above-mentioned method embodiments executed by the computer device 10, which implement the principle and the technical effect similarly, and the detailed description of the embodiment is omitted here.
Computer-readable storage medium 12 may include random access memory and may also include non-volatile storage, such as at least one disk storage.
The bus 13 may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, the buses in the figures of the present application are not limited to only one bus or one type of bus.
In addition, an embodiment of the present application further provides a readable storage medium, where a computer executing instruction is stored in the readable storage medium, and when a processor executes the computer executing instruction, the font icon processing method as above is implemented.
To sum up, according to the font icon processing method, apparatus, and computer-readable storage medium provided in the embodiments of the present application, first, font icons required by a target development project are collected, and a vector graphics format file of the font icons is obtained; then, installing a loading program of the vector graphic sprite, and generating a font icon template of the vector graphic format file of the font icon through the loading program; then, packaging the font icon template into a component, and exposing the packaged component as a global component; and finally, calling a target font icon in the global component, and displaying the called target font icon. And each font icon is included in the font icon template through the font icon template in the vector graphic format, and the target font icon is displayed by calling the target font icon in the font icon template. When a font icon is newly added, only the downloaded vector graphic format file of the font icon needs to be automatically introduced into the font icon template through a loading program, and meanwhile, the incremental font icon management method can not cause the problem of later maintenance caused by the loss of the font icon.
The embodiments described above are only a part of the embodiments of the present application, and not all of the embodiments. The components of the embodiments of the present application, as generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations. Thus, the detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the application, but is merely representative of selected embodiments of the application. Based on this, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A font icon processing method is applied to a computer device, and comprises the following steps:
collecting font icons required by a target development project, and acquiring vector graphic format files of the font icons;
installing a loading program of the vector graphic sprite, and generating a font icon template of the vector graphic format file of the font icon through the loading program;
packaging the font icon template into a component, and exposing the packaged component as a global component;
and calling a target font icon in the global component, and displaying the called target font icon.
2. The font icon processing method as claimed in claim 1, wherein the step of collecting font icons required by the target development project and obtaining a vector graphics format file of the font icons comprises:
collecting font icons required by the target development project;
acquiring a vector graphic format file of each font icon;
and creating a first folder under the directory corresponding to the target development project, and putting the vector graphic format file of the font icon into the first folder.
3. The font icon processing method as claimed in claim 2, wherein the step of installing a loader of the vector graphic sprite, by which a font icon template of the vector graphic format file of the font icon is generated, comprises:
installing a loading program of a vector graphic sprite;
creating a configuration file, and configuring the dynamic introduction authority of the vector graphic format file of the font icon in the first folder through the configuration file;
introducing all vector graphics format files in the first folder through a dynamic introduction function in the loading program;
and executing all vector graphic format files in the introduced first folder to generate the font icon template.
4. The font icon processing method as claimed in claim 3, wherein the step of creating a configuration file through which the dynamic import authority of the vector graphics format file of the font icon in the first folder is configured comprises:
creating a configuration file under a directory corresponding to the target development project, wherein the configuration file is used for configuring the dynamic introduction permission of the loader to a vector graphic format file of the font icon in the first folder;
the step of importing all the files in the vector graphics format in the first folder through the dynamic import function in the loader comprises:
creating a storage file under a directory corresponding to the target development project, and putting all vector graphics format files dynamically introduced into the first folder into the storage file;
the step of executing all vector graphics format files in the introduced first folder to generate the font icon template includes:
and calling the storage file through the entry file of the target development project, executing automatic introduction of all vector graphic format files in the first folder, and generating the font icon template.
5. The font icon processing method as claimed in claim 4, wherein the step of encapsulating the font icon template into a component and exposing the encapsulated component as a global component comprises:
newly building a new file under the component folder, and packaging the font icon template to obtain the component;
introducing the component in an entry file of the target development project and exposing the component as a global component.
6. A font icon processing device applied to a computer device, the device comprising:
the system comprises a collecting and obtaining module, a vector graphic format file and a display module, wherein the collecting and obtaining module is used for collecting font icons required by a target development project and obtaining the vector graphic format file of the font icons;
the installation and generation module is used for installing a loading program of the vector graphic sprite and generating a font icon template of the vector graphic format file of the font icon through the loading program;
the packaging module is used for packaging the font icon template into a component and exposing the packaged component as a global component;
and the calling and displaying module is used for calling the target font icon in the global component and displaying the called target font icon.
7. The font icon processing apparatus of claim 6, wherein the collection and retrieval module is to:
collecting font icons required by the target development project;
acquiring a vector graphic format file of each font icon;
and creating a first folder under the directory corresponding to the target development project, and putting the vector graphic format file of the font icon into the first folder.
8. The font icon processing apparatus of claim 7, wherein the installation and generation module is to:
installing a loading program of a vector graphic sprite;
creating a configuration file, and configuring the dynamic introduction authority of the vector graphic format file of the font icon in the first folder through the configuration file;
introducing all vector graphics format files in the first folder through a dynamic introduction function in the loading program;
and executing all vector graphic format files in the introduced first folder to generate the font icon template.
9. The font icon processing apparatus as claimed in claim 8, wherein the installation and generation module is specifically configured to:
creating a configuration file under a directory corresponding to the target development project, wherein the configuration file is used for configuring the dynamic introduction permission of the loader to a vector graphic format file of the font icon in the first folder;
creating a storage file under a directory corresponding to the target development project, and putting all vector graphics format files dynamically introduced into the first folder into the storage file;
and calling the storage file through the entry file of the target development project, executing automatic introduction of all vector graphic format files in the first folder, and generating the font icon template.
10. A computer-readable storage medium having stored therein instructions that, when executed, cause a computer device to perform the font icon processing method of any of claims 1-5.
CN202111545493.3A 2021-12-16 2021-12-16 Font icon processing method and device and computer readable storage medium Pending CN114237407A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111545493.3A CN114237407A (en) 2021-12-16 2021-12-16 Font icon processing method and device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111545493.3A CN114237407A (en) 2021-12-16 2021-12-16 Font icon processing method and device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN114237407A true CN114237407A (en) 2022-03-25

Family

ID=80757236

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111545493.3A Pending CN114237407A (en) 2021-12-16 2021-12-16 Font icon processing method and device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN114237407A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115328353A (en) * 2022-08-12 2022-11-11 济南浪潮数据技术有限公司 Method, device and medium for generating iconfont resource

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115328353A (en) * 2022-08-12 2022-11-11 济南浪潮数据技术有限公司 Method, device and medium for generating iconfont resource
CN115328353B (en) * 2022-08-12 2024-02-09 济南浪潮数据技术有限公司 Method, device and medium for generating iconfont resource

Similar Documents

Publication Publication Date Title
WO2016155388A1 (en) Method and device for installing and running application
US9928038B2 (en) Dynamically building locale objects or subsections of locale objects based on historical data
CN108572965B (en) Resource loading method and device
CN109800154B (en) Test data loading method and device, computer equipment and storage medium
CN111680253B (en) Page application data packet generation method and device, computer equipment and storage medium
CN108572825B (en) User interface processing method, device and equipment
CN112631590B (en) Component library generation method, device, electronic equipment and computer readable medium
CN111897623A (en) Cluster management method, device, equipment and storage medium
CN111736884A (en) Componentization method and system
CN111444453A (en) Page return data processing method and device
CN114237407A (en) Font icon processing method and device and computer readable storage medium
CN113434582B (en) Service data processing method and device, computer equipment and storage medium
CN112905263A (en) Loading method and device of custom component, electronic equipment and storage medium
CN115543440A (en) Method for migrating android project to android-like system, electronic equipment and storage medium
CN117234582A (en) Project code processing method and device, electronic equipment and storage medium
CN111596931A (en) Application program packaging method and device, electronic equipment and readable storage medium
CN110941443A (en) Method and device for modifying file name in SDK and electronic equipment
CN112965713B (en) Development method, device, equipment and storage medium of visual editor
CN112732277B (en) Java multi-service application automatic installation and deployment integration method and system
CN114741296A (en) Unit testing method, unit testing device, electronic equipment and storage medium
CN112328241B (en) Method and device for creating Android library module dependency relationship in application program development
CN114003603A (en) Data export method, system and storage medium based on big data platform
CN107315951B (en) Program installation package anti-interception method and device
CN114662022A (en) Application isolation method and device
CN112558964A (en) Webpage generation method, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination