Font switching method, terminal and computer readable storage medium
A technology of fonts and switching instructions, applied in the field of communication
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
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, ...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com