Font switching method, terminal and computer readable storage medium

A technology of fonts and switching instructions, applied in the field of communication

Inactive Publication Date: 2019-04-02
NUBIA TECHNOLOGY CO LTD
View PDF7 Cites 4 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The technical problem to be solved by the present invention lies in the problem in the prior art that the system font needs to be restarted to take effect after switching. Aiming at this technical problem, a method for switching fonts, a terminal and a computer-readable storage medium are provided

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Font switching method, terminal and computer readable storage medium
  • Font switching method, terminal and computer readable storage medium
  • Font switching method, terminal and computer readable storage medium

Examples

Experimental program
Comparison scheme
Effect test

no. 1 example

[0070]The basic idea of ​​existing system font switching methods is to directly or indirectly replace the font font.ttf file in the system to achieve. Since the system font resources have been pre-loaded to the Zygote incubator process as early as the startup initialization, each application process is split from the Zygote process, and the fonts loaded at the startup initialization are used. Therefore, after replacing the font file font.ttf It will not take effect immediately, and the system must be restarted. In order to solve the above-mentioned problem that the system needs to be restarted when switching fonts, this embodiment provides a font switching method, such as image 3 as shown, image 3 The basic flowchart of the font switching method provided in this embodiment, the font switching method includes:

[0071] S301. Determine whether a switching instruction for switching the system font is received, if yes, go to S302, if not, go to S301.

[0072] It can be unders...

no. 2 example

[0085] The loading of fonts needs to parse the font configuration file in fonts.xml, and load more than 20 fonts. The codes are all in the Java layer code of the framework, and the process of loading specific font files is also included, so it is prepared for applying fonts without restarting the terminal. enough conditions. Implementing the font loading scheme mainly needs to meet two points: font reloading and refresh without restart.

[0086] 1. Font reload:

[0087] The original font loading process in the android framework is mainly completed in the typeface class, specifically in the init() or main() method to achieve a system-level font loading scheme, mainly the font initialization process, etc., in the typeface class Add an interface to reload fonts. reload() is used to reload fonts. This interface needs to empty the global variable representing the current font, and reload new font data when switching fonts.

[0088] 2. Refresh without restart:

[0089] Refer to t...

no. 3 example

[0114] This embodiment also provides a terminal, see Figure 7 As shown, also includes processor 701, memory 702 and communication bus 703, wherein:

[0115] The communication bus 703 is used to realize connection and communication between the processor 701 and the memory 702;

[0116] The processor 701 is used to execute one or more programs stored in the memory 702, so as to realize the following steps:

[0117] Judging whether a switch command for switching the system font is received;

[0118] If so, add a font loading interface in the font type class, and the font loading interface is used to reload the target font resource;

[0119] In the system configuration class, add the tag information representing font changes to obtain a new system configuration class;

[0120] The application process refreshes and displays the target font according to the new system configuration class.

[0121] In some embodiments, the switching instruction includes target font information, ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a font switching method, a terminal and a computer readable storage medium. The font switching method comprises the steps of: determining whether a switching instruction for switching system fonts is received, and if so, adding a font loading interface to a font type class, wherein the font loading interface is used for reloading a target font resource; additionally arranging mark information representing font changes in a system configuration class to obtain a new system configuration class; and the application process is refreshed according to the system configurationclass and displays a target font, and solves the problem that the system fonts in the prior art only become effective after restarting. The invention further discloses a terminal and a computer readable storage medium. By implementing the font switching method, the terminal and the computer readable storage medium, the effects that the system fonts can be switched without restarting, the new visual effect is quickly displayed for the user, and the non-restart refreshing of the system font is realized; and the font switching method, the terminal and the computer readable storage medium improvethe user experience and satisfaction degree.

Description

technical field [0001] The present invention relates to the technical field of communication, and more specifically, to a font switching method, a terminal and a computer-readable storage medium. Background technique [0002] In the context of the rapid development of mobile terminals, the convenient operation and user-friendly design of the terminal have become a part of the mobile terminal that cannot be ignored. Among them, many users hope to switch the font of the terminal system to obtain a richer visual experience. [0003] As an important function of mobile phone skinning, fonts are very popular among users. The switching of fonts requires frame redirection to achieve the purpose of switching. The basic idea of ​​switching fonts in early versions is to directly or indirectly replace the font.ttf file in the system. to achieve. Since the system font resources have been pre-loaded to the Zygote incubator process as early as the startup initialization, the application p...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): H04M1/725G06F17/21
CPCG06F40/109H04M1/72403H04M1/72427
Inventor 高伟
Owner NUBIA TECHNOLOGY CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products