Summary of the invention
In view of the above problems, the object of the present invention is to provide a kind of portable terminal font replacing method and device, be intended to solve existing system replacement method operation more complicated, and need the covering system default font, so that technical matters that can't the recovery system default font.
On the one hand, described portable terminal font replacing method comprises the steps:
When receiving the font selection instruction, in local default file folder, search font file corresponding to described font selection instruction;
According to described font file constructing system default font class;
The described default font class of instantiation refreshes the display interface of drawing portable terminal.
On the other hand, described portable terminal font more changing device comprise:
Font is searched the unit, is used for when receiving the font selection instruction, searches font file corresponding to described font selection instruction in local default file folder;
Default font class construction unit is used for according to described font file constructing system default font class;
Display unit is refreshed at the interface, is used for the described default font class of instantiation, refreshes the display interface of drawing portable terminal.
The invention has the beneficial effects as follows: in technical solution of the present invention, can define in this locality a default file folder that is used for preserving third party's font, store the various font files that the user needs in this document folder, font style at portable terminal arranges in the hurdle simultaneously, be provided with the font option corresponding with described various font files, when the user need to change font, in described font style the corresponding font option of selection in the hurdle is set, generate the font selection instruction, portable terminal is searched the corresponding font file of described font selection instruction again in the default file folder, portable terminal refreshes the display interface of drawing portable terminal according to this font file again, realized like this replacing system font, the present invention need not the font file of covering system acquiescence, in the default file folder, various third party's font files are arranged, the user only needs in font style the font of selecting required replacing in the interface to be set and can finish the font replacing like this, the method is simple to operate, and can not cover the original system default font, the user also can return to the system default font at an easy rate.
Embodiment
In order to make purpose of the present invention, technical scheme and advantage clearer, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, is not intended to limit the present invention.
For technical solutions according to the invention are described, describe below by specific embodiment.
Embodiment one:
Fig. 1 shows the flow process of the portable terminal font replacing method that first embodiment of the invention provides, and only shows for convenience of explanation the part relevant with the embodiment of the invention.
The portable terminal font replacing method that the present embodiment provides comprises the steps:
Step S101, when receiving the font selection instruction, in local default file folder, search font file corresponding to described font selection instruction.
Described default file folder is for being used for preserving the file of third party's font file, the user can be placed on own required font file in this file, arrange in font style corresponding to portable terminal and to be present in font option corresponding to described each font file in the hurdle, when the user need to change font, enter the portable terminal font style interface is set, select the font option of own current required replacing to get final product, such as Chococooky, Rosemary, the font options such as Times New Roman, after the user clicks the font option, can generate corresponding font selection instruction, include font file information in this instruction, in described default file folder, search corresponding font file according to described font file information again.Font file is the font file of ttf form normally, such as in the Android system, the font file of system default is positioned at/the system/fonts/ catalogue under, the English character library of acquiescence is DroidSans.ttf, the Chinese word library of acquiescence is DroidSansFallback.ttf.In the present embodiment, third party's font file is kept in the default file folder, such as the default file sandwiched being set to/data/data/fonts/.
Step S102, according to described font file constructing system default font class.
Mobile terminal operating system is in rendered fonts, all be to make up default font class Typeface in the terminal program according to the ttf file, had after this default font class, system program and end application can call such, finish font and draw, so in this step, after finding the font file of user selection, make up the default font class according to described font file, for routine call.
Step S103, the described default font class of instantiation refresh the display interface of drawing portable terminal.
After making up completion system acquiescence class, the program in the terminal comprises that system program and the application program that is installed in the terminal both can use such, can redraw each display interface.
The present embodiment is compared with existing font replacement method, third party's font file is saved in the local default file folder, the default font of the present embodiment in can covering system default font file, the user only needs in font style the required font option of selection in the interface to be set, can finish the font of system is changed, method of operating is simple, and the user need to return to default font, selects the default font option to get final product.
Embodiment two:
Fig. 2 shows the flow process of the portable terminal font replacing method that second embodiment of the invention provides, and only shows for convenience of explanation the part relevant with the embodiment of the invention.
The portable terminal font replacing method that the present embodiment provides comprises the steps:
Step S201, establishment are used for preserving the file of third party's font, and this document folder presss from both sides for described default file.
This step does not limit concrete folder content, and prerequisite is that user and portable terminal have common cognition to get final product to this catalogue.
Step S202, when in finding described default file folder, the font of new interpolation being arranged, automatically arrange in described portable terminal font style and add corresponding font option in the hurdle;
Step S203, when in finding described default file folder, having font deleted, automatically in described portable terminal font style font option corresponding to deletion in the hurdle is set.
The user is in the process of using portable terminal, may add new font to described default file folder, perhaps delete old font, in order to make it possible to use the font of new interpolation, and prevent from using deleted font to cause the situation of system crash, among above-mentioned steps S202 and the S203, when in finding described default file folder, the font of new interpolation being arranged, automatically arrange in described portable terminal font style and add corresponding font option in the hurdle, when in finding described default file folder, having font deleted, automatically in described portable terminal font style font option corresponding to deletion in the hurdle is set, so in embodiments of the present invention, the font option that font style arranges in the hurdle can be automatically according to the corresponding interpolation of font file in the described default file folder or minimizing font option.
Step S204, when receiving the font selection instruction, in local default file folder, search font file corresponding to described font selection instruction;
Step S205, when receiving the default font selection instruction, the font file in the calling system default font file.
Arrange in the hurdle in font style, the user can select own required font option, also can select to return to default font, when selecting default font, directly call the font file in the default font file, if when selecting other fonts, in local default file folder, search font file corresponding to described font selection instruction.
Step S206, according to described font file constructing system default font class;
Step S207, the described default font class of instantiation refresh the display interface of drawing portable terminal.
The present embodiment has realized that further the user can place the font file of oneself liking in the default file folder, enriched the function of portable terminal according to the few font option that adds deduct of the font file automatic torque-increasing in the default file folder on the basis of embodiment one.
Embodiment three:
Fig. 3 shows the more structure of changing device of portable terminal font that third embodiment of the invention provides, only shows for convenience of explanation the part relevant with the embodiment of the invention.
The portable terminal font that the present embodiment provides more changing device comprises:
Font is searched unit 301, is used for when receiving the font selection instruction, searches font file corresponding to described font selection instruction in local default file folder;
Default font class construction unit 302 is used for according to described font file constructing system default font class;
Display unit 303 is refreshed at the interface, is used for the described default font class of instantiation, refreshes the display interface of drawing portable terminal.
Each functional unit 301-303 correspondence that the present embodiment provides has realized the step S101-S103 among the embodiment one, concrete, when receiving the font selection instruction, font is searched unit 301 and search font file corresponding to described font selection instruction in local default file folder, default font class construction unit 302 is again according to described font file constructing system default font class, the described default font class of display unit instantiation is refreshed at the interface, refreshes the display interface of drawing portable terminal.In the present embodiment, the user can be saved in third party's font file in the local default file folder, default font in so can covering system default font file, the user only needs in font style the required font option of selection in the interface to be set, can finish the font of system is changed, method of operating is simple.
Embodiment four:
Fig. 4 shows the more structure of changing device of portable terminal font that fourth embodiment of the invention provides, only shows for convenience of explanation the part relevant with the embodiment of the invention.
The portable terminal font that the present embodiment provides more changing device comprises:
File creating unit 401 is used for creating the file that is used for preserving third party's font, and this document folder is described default file folder;
Fontoption adding device 402 is used for when finding that described default file folder has the font of new interpolation, automatically arranges in described portable terminal font style and adds corresponding font option in the hurdle;
Fontoption delete cells 403 is used for automatically in described portable terminal font style font option corresponding to deletion in the hurdle being set when finding that described default file folder has font deleted;
Font is searchedunit 404, is used for when receiving the font selection instruction, searches font file corresponding to described font selection instruction in local default file folder;
Font call unit 405 is used for when receiving the default font selection instruction font file in the calling system default font file;
Default fontclass construction unit 406 is used for according to described font file constructing system default font class;
Display unit 407 is refreshed at the interface, is used for the described default font class of instantiation, refreshes the display interface of drawing portable terminal.
Each functional unit 401-407 correspondence that the present embodiment provides has realized the step S201-S207 among the embodiment two, on the other hand, originally be implemented on the basis of embodiment three, increasedfile creating unit 401, fontoption adding device 402, font option deletecells 403,font call unit 405, unit by described increase, realized according to the few font option that adds deduct of the font file automatic torque-increasing in the default file folder, the user can place the font file of oneself liking in the default file folder, the user also can select to return to the default system default font simultaneously, operating process is simple, has enriched the function of portable terminal.
One of ordinary skill in the art will appreciate that, realize that all or part of step in above-described embodiment method is to come the relevant hardware of instruction to finish by program, described program can be in being stored in a computer read/write memory medium, described storage medium is such as ROM/RAM, disk, CD etc.
The above only is preferred embodiment of the present invention, not in order to limiting the present invention, all any modifications of doing within the spirit and principles in the present invention, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.