Font switching method and electronic device
AssigneePetal Cloud Technology Co., Ltd.
InventorsLiang Lu, Yaoming Liu, Lin Peng
Life of this patent
Estimating the term…
Abstract
A font switching method obtains, through pixel matching with a comparison font, a target font consistent with a font currently used by an operating system, and applies the target font to a third-party application, enabling the third-party application to accurately vary with a font change of the operating system and to avoid inconsistency between the font used by the third-party application and the font used by the operating system.
Claims20
A method comprising:
- generating a target dot matrix based on a first font currently used by an operating system;
- obtaining comparison dot matrices corresponding to various types of fonts loaded by the operating system;
- performing pixel matching between each of the comparison dot matrices and the target dot matrix to determine a first comparison dot matrix matching the target dot matrix;
- setting a second font of a type corresponding to the first comparison dot matrix as a target font;
- and
- switching a third font of a third-party application to the target font.
An electronic device comprising:
- a memory configured to store instructions;
- and
- a processor coupled to the memory and configured to execute the instructions to cause the electronic device to:
- generate a target dot matrix based on a first font currently used by an operating system;
- obtain comparison dot matrices corresponding to various types of fonts loaded by the operating system;
- perform pixel matching between each of the comparison dot matrices and the target dot matrix to determine a first comparison dot matrix matching the target dot matrix;
- set a second font of a type corresponding to the first comparison dot matrix as a target font;
- and
- switch a third font of a third-party application to the target font.
A computer program product comprising computer-executable instructions that are stored on a non-transitory computer-readable storage medium and that, when executed by a processor, cause an electronic device to:
- generate a target dot matrix based on a first font currently used by an operating system;
- obtain comparison dot matrices corresponding to various types of fonts loaded by the operating system;
- perform pixel matching between each of the comparison dot matrices and the target dot matrix to determine a first comparison dot matrix matching the target dot matrix;
- set a second font of a type corresponding to the first comparison dot matrix as a target font;
- and
- switch a third font of a third-party application to the target font.
Dependencies are inferred from the claim text.