CN108734662A - The method and apparatus for showing icon - Google Patents
The method and apparatus for showing icon Download PDFInfo
- Publication number
- CN108734662A CN108734662A CN201810526490.7A CN201810526490A CN108734662A CN 108734662 A CN108734662 A CN 108734662A CN 201810526490 A CN201810526490 A CN 201810526490A CN 108734662 A CN108734662 A CN 108734662A
- Authority
- CN
- China
- Prior art keywords
- vector artwork
- icon
- dpi
- mobile terminal
- screen
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 31
- 238000004040 coloring Methods 0.000 claims description 14
- 238000005516 engineering process Methods 0.000 abstract description 8
- 238000012545 processing Methods 0.000 description 16
- 230000001133 acceleration Effects 0.000 description 9
- 230000002093 peripheral effect Effects 0.000 description 9
- 238000004891 communication Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 8
- 238000010586 diagram Methods 0.000 description 7
- 238000009434 installation Methods 0.000 description 7
- 230000008569 process Effects 0.000 description 4
- 238000009877 rendering Methods 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 238000013473 artificial intelligence Methods 0.000 description 2
- 239000000919 ceramic Substances 0.000 description 2
- 239000003795 chemical substances by application Substances 0.000 description 2
- 230000006835 compression Effects 0.000 description 2
- 238000007906 compression Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 230000004927 fusion Effects 0.000 description 2
- 230000005484 gravity Effects 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 230000001052 transient effect Effects 0.000 description 2
- 239000006227 byproduct Substances 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000006698 induction Effects 0.000 description 1
- 230000001788 irregular Effects 0.000 description 1
- 210000003127 knee Anatomy 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 239000000047 product Substances 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000006641 stabilisation Effects 0.000 description 1
- 238000011105 stabilization Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/001—Texturing; Colouring; Generation of texture or colour
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- User Interface Of Digital Computer (AREA)
- Controls And Circuits For Display Device (AREA)
Abstract
The present invention provides a kind of method and apparatus of display icon, belong to field of computer technology.The method includes:Obtain the dots per inch DPI of the screen;If the DPI is not equal to preset value, by the word render component, the corresponding vector artwork of icon to be shown is obtained from preset ttf font files, according to the DPI, the vector artwork is shown.Using the present invention, the storage resource of occupancy can be made fewer.
Description
Technical field
The present invention relates to field of computer technology, more particularly to a kind of method and apparatus of display icon.
Background technology
With the development of computer technology, the terminal of high DPI (Dots Per Inch, dots per inch) screen is increasingly
Universal, in order to allow application program to be shown on the screen of high DPI, terminal can use the mode of 2 times of figures to image
It is shown.
In the related technology, bitmap (the lattice pixels number of icon of two parts of icons is set in the installation kit of application program
According to), a icon is the original lattice pixels data of icon, another icon is two times of the original lattice pixels data of icon
Lattice pixels data.In this way, terminal obtains icon when loading icon to be shown, according to screen DPI, and icon is shown
Show.
In the implementation of the present invention, inventor has found that the relevant technologies have at least the following problems:
For supporting the application program of high DPI, due to storing the data of two parts of icon images, lead to the storage occupied money
Source is relatively more.
Invention content
In order to solve the problems, such as the relevant technologies, an embodiment of the present invention provides a kind of method and apparatus of display icon.Institute
It is as follows to state technical solution:
In a first aspect, providing a kind of display figure calibration method, the method is applied to the screen of mobile terminal, the shifting
Dynamic terminal includes word render component, the method includes:
Obtain the dots per inch DPI of the screen;
If the DPI is not equal to preset value, by the word render component, from preset ttf font files
The corresponding vector artwork of icon to be shown is obtained,
According to the DPI, the vector artwork is shown.
Optionally, described to obtain the corresponding vector artwork of icon to be shown from preset ttf font files, including:
According to the unicode characters of icon to be shown, the unicode is obtained from the preset ttf font files
The corresponding vector artwork of character.
Optionally, described that the vector artwork is shown according to the DPI, including:
According to the DPI, the vector artwork is zoomed in and out, the vector artwork after scaling is shown.
Optionally, described that the vector artwork is zoomed in and out according to the DPI, the vector artwork after scaling is carried out
It has been shown that, including:
According to the DPI, the font height of the unicode characters of the icon to be shown is determined;
According to the font height, the vector artwork is zoomed in and out;
Vector artwork after scaling is shown.
Optionally, the method further includes:
Obtain the corresponding colouring information of the icon to be shown;
It is described that the vector artwork is shown, including:
According to the colouring information, the vector artwork is shown.
Second aspect, provides a kind of device of display icon, and described device is applied to the screen of mobile terminal, the shifting
Dynamic terminal includes word render component, and described device includes:
Acquisition module, the dots per inch DPI for obtaining the screen;If the DPI is not equal to preset value, lead to
The word render component is crossed, the corresponding vector artwork of icon to be shown is obtained from preset ttf font files,
Display module, for according to the DPI, being shown to the vector artwork.
Optionally, the acquisition module, is used for:
According to the unicode characters of icon to be shown, the unicode is obtained from the preset ttf font files
The corresponding vector artwork of character.
Optionally, the display module, is used for:
According to the DPI, the vector artwork is zoomed in and out, the vector artwork after scaling is shown.
Optionally, the display module, is used for:
According to the DPI, the font height of the unicode characters of the icon to be shown is determined;
According to the font height, the vector artwork is zoomed in and out;
Vector artwork after scaling is shown.
Optionally, the acquisition module, is additionally operable to:
Obtain the corresponding colouring information of the icon to be shown;
The display module, is used for:
According to the colouring information, the vector artwork is shown.
The advantageous effect that technical solution provided in an embodiment of the present invention is brought includes at least:
In the embodiment of the present invention, due to being to use ttf font files, arbitrarily enlarged to vector artwork progress all can will not
It is fuzzy, so only storage portion ttf font files can adapt to the screen of high DPI, the number without storing two parts of icons
According to so the storage resource occupied is fewer.And by word render component, various patterns are rendered, rendering efficiency is relatively high.
Description of the drawings
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment
Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for
For those of ordinary skill in the art, without creative efforts, other are can also be obtained according to these attached drawings
Attached drawing.
Fig. 1 a are a kind of schematic diagrames of icon provided in an embodiment of the present invention;
Fig. 1 b are a kind of unicode of icon provided in an embodiment of the present invention;
Fig. 2 is a kind of method flow diagram of display icon provided in an embodiment of the present invention;
Fig. 3 is a kind of schematic diagram of icon provided in an embodiment of the present invention;
Fig. 4 is a kind of apparatus structure schematic diagram of display icon provided in an embodiment of the present invention;
Fig. 5 is a kind of structural schematic diagram of terminal provided in an embodiment of the present invention.
Specific implementation mode
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention
Formula is described in further detail.
An embodiment of the present invention provides a kind of display figure calibration method, the executive agent of this method can be mobile terminal.
Terminal can be mobile phone, tablet computer etc., and processor, receiving-transmitting device and memory can be provided in mobile terminal, and processor can
Show that the relevant treatment during icon, receiving-transmitting device can be used for receiving and transmitting message for processing, memory can be with
Data for storing the data and generation that are needed during display icon.It can also the inputs such as including screen in mobile terminal
Output equipment is used for display interface.The embodiment of the present invention carries out the detailed description of scheme so that executive agent is mobile phone as an example.
It before being implemented, first, introduces, the application scenarios in the embodiment of the present invention, user wants to use some
When application program, which can be installed in the terminal, the application program is opened in then operation, and mobile terminal then can
The interface for showing the application program, when thering is icon to show in interface, the method that the embodiment of the present invention can be used, the present invention
It is illustrated by taking the icon in the target interface of display target application program as an example in embodiment.Wherein, the icon in interface can
To be certain labels of fixed display in interface, for example, as shown in Figure 1a, Logo, the sign of application program (are such as sung in list
There is no the sign of song) etc..
Secondly, it introduces, corresponding destination application makes the process of ttf font files, obtains intended application first
SVG (Scalable Vector Graphics, scalable vector graphics) picture of all icons of program, as shown in Figure 1 b,
Each SVG pictures are converted into ttf font files, that is, by SVG pictures and unicode (uniform character encoding standard) word
Symbol corresponds to, that is, the correspondence of unicode characters and vector artwork is stored in ttf font files, for example, such as Fig. 1 b institutes
Show, it is " big " that being sung in Fig. 1 a in list, which does not have the corresponding unicode characters of the sign of song,.Ttf font files can be set
It sets in installation kit, mobile terminal just directly stores ttf font files after installation targets application program.In addition, in ttf
In font file, the original dimension of initial font height that there are one each unicode characters and corresponding vector artwork,
The initial font height of namely unicode characters is corresponding with the original dimension of vector artwork, subsequently can be by adjusting word
The initial font height of symbol, to adjust the display size of vector artwork, for example, for some unicode character, initial font is high
Degree is a, and the original dimension of vector artwork is b, and the font height of unicode characters is a1 after adjustment, then the ruler of vector artwork
Very little is a1*b/a.
Finally, it introduces, how ttf font files is used, in the code for the target interface for writing destination application
When, the code for obtaining the corresponding vector artwork of icon can be write at the position of the icon of target interface, in this way, subsequently aobvious
When diagram mark, the corresponding vector artwork of icon can be obtained, includes then at the position of icon by vector artwork.
As shown in Fig. 2, illustrated by taking the icon in the interface of display target application program as an example in the embodiment of the present invention,
The process flow of this method can be as follows:
Step 201, the DPI of screen is obtained.
Wherein, DPI refers in the screen of mobile terminal in each inchage, and screen samples can be shown or the number of output point
Mesh.
In force, user wants to use destination application, destination application to be any application program, for example, i.e.
When communication application program, audio application etc., can be mobile in mobile terminal installation targets application program, after installation is complete
Terminal then can display target application program icon, user can click the icon of destination application, and mobile terminal can then connect
The open command of destination application is received, mobile terminal can be carried out with the main interface of display target application program, user
Subsequent operation.
When mobile terminal detects some interface of display target application program, mobile terminal can obtain the interface
Code, if the interface includes icon (being subsequently known as icon to be shown), mobile terminal is executing figure to be shown
When target code, the DPI of pre-stored screen can be obtained, such as DPI is 120.For example, as shown in figure 3, intended application journey
Sequence is audio application, and icon to be shown is the logo of audio application.
Step 202, if DPI is not equal to preset value, by word render component, from preset ttf font files
Obtain the corresponding vector artwork of icon to be shown.
Wherein, preset value can be preset by technical staff, and be stored into the installation kit of destination application, be answered with target
It is installed to mobile terminal with the installation kit of program, preset value can be the size of the DPI of general screen, such as 96.
In force, after acquisition for mobile terminal to the DPI of screen, it can be determined that the size of DPI and preset value 96, if screen
The DPI of curtain is not equal to preset value 96, then mobile terminal can call word render component, from preset ttf font files, obtain
Take the corresponding vector artwork of icon to be shown.
In addition, if the DPI of screen is equal to 96, mobile terminal can also call word render component, from preset ttf
In font file, the corresponding vector artwork of icon to be shown is obtained, directly vector artwork is shown, in this way, just completing
The display of icon to be shown.
In addition, if the DPI of screen be equal to 96, mobile terminal can also in the way of two times of figures in the prior art,
Icon to be shown is shown.
Optionally, unicode characters can be based on, obtain the corresponding vector artwork of icon, corresponding processing can be as follows:
According to the unicode characters of icon to be shown, unicode characters correspondence is obtained from preset ttf font files
Vector artwork.
Wherein, ttf font files include the correspondence of unicode characters and vector artwork.
In force, in the code at the interface for writing destination application, the code at the position of icon to be shown is
The process for the vector artwork for obtaining unicode characters is executed, mobile terminal can obtain the unicode characters of icon to be shown,
Then from the correspondence of the unicode characters of ttf font files and vector artwork, it is corresponding that unicode characters are found
Vector artwork, in this way, just getting the corresponding vector artwork of icon to be shown.
Step 203, according to DPI, vector artwork is shown.
In force, mobile terminal is after getting the corresponding vector artwork of icon, due to the vector of font file storage
Picture is usually corresponding equal to 96 with DPI, so mobile terminal can adjust the size of vector artwork according to the DPI of screen,
Vector artwork after adjustment is shown.
Optionally, processing can be zoomed in and out to vector artwork, adjust the size of vector artwork, corresponding step 203
Processing can be as follows:
According to DPI, vector artwork is zoomed in and out, the vector artwork after scaling is shown.
In force, mobile terminal can adjust after getting the corresponding vector artwork of icon according to the DPI of screen
The size of vector artwork can processing is amplified to vector artwork, in screen when the DPI of screen is more than preset value
When DPI is less than preset value, diminution processing is carried out to vector artwork, then the vector artwork after scaling is shown.
For example, when the DPI of screen is more than preset value, the DPI of screen is 120, preset value 96, the DPI of screen with it is pre-
If the ratio of value is 5/4, vector artwork is amplified 5/4 times, vector artwork becomes original 5/4.It is less than in the DPI of screen default
When value, the DPI of screen is 90, and preset value 96, the DPI of screen and the ratio of preset value are 15/16, and vector artwork is reduced
15/16 times, vector artwork becomes original 15/16.
Optionally, vector artwork can be shown, accordingly based on the font height of the unicode characters of icon
Processing can be as follows:
According to DPI, the font height of the unicode characters of icon icon to be shown is determined;
According to font height, vector artwork is zoomed in and out;
Vector artwork after scaling is shown.
In force, after getting the corresponding vector artwork of icon to be shown, mobile terminal can calculate mobile terminal
The font height of the unicode characters of icon to be shown is adjusted to initial font height by the DPI of screen and the ratio of preset value
With the product of the ratio.
Then the original dimension of vector artwork is multiplied by product obtained above, obtains the size after vector artwork scaling,
The size being then based on after vector artwork scaling, processing is zoomed in and out to vector artwork, can be to contracting after the completion of scaling processing
Putting treated, vector artwork is shown.
Optionally, can also be that vector artwork adds color when showing the vector artwork of icon to be shown, it is corresponding to locate
Reason can be as follows:
Obtain the corresponding colouring information of icon to be shown;
Vector artwork is shown according to colouring information according to DPI.
In force, when compiling the code of icon to be shown, also compiling has colouring information, mobile terminal can root together
According to the code of icon to be shown, the colouring information of icon to be shown is obtained.
Then mobile terminal can adjust the size of vector artwork according to the DPI of screen, can also be the DPI in screen
When more than default value, processing is amplified to vector artwork, screen DPI be less than default value when, to vector artwork into
Row diminution is handled, and is then shown to the vector artwork after scaling, and adds corresponding face in display for vector artwork
Color.
In addition, if the DPI of screen is equal to default value, mobile terminal can directly show vector artwork, and
And add corresponding color (display color is such as controlled by the electric current of the backlight of control mobile terminal) for vector artwork.
In the embodiment of the present invention, due to being to use ttf font files, arbitrarily enlarged to vector artwork progress all can will not
It is fuzzy, so only storage portion ttf font files can adapt to the screen of high DPI, the number without storing two parts of icons
According to so the storage resource occupied is fewer.And by word render component, various patterns are rendered, rendering efficiency is relatively high.
Based on the same technical idea, the embodiment of the present invention additionally provides a kind of display illustrated devices, described device application
In the screen of mobile terminal, the mobile terminal includes word render component, as shown in figure 4, the device includes:
Acquisition module 410, the dots per inch DPI for obtaining the screen;If the DPI is not equal to preset value,
Then by the word render component, the corresponding vector artwork of icon to be shown is obtained from preset ttf font files,
Display module 420, for according to the DPI, being shown to the vector artwork.
Optionally, the acquisition module 410, is used for:
According to the unicode characters of icon to be shown, the unicode is obtained from the preset ttf font files
The corresponding vector artwork of character.
Optionally, the display module 420, is used for:
According to the DPI, the vector artwork is zoomed in and out, the vector artwork after scaling is shown.
Optionally, the display module 420, is used for:
According to the DPI, the font height of the unicode characters of the icon to be shown is determined;
According to the font height, the vector artwork is zoomed in and out;
Vector artwork after scaling is shown.
Optionally, the acquisition module 410, is additionally operable to:
Obtain the corresponding colouring information of the icon to be shown;
The display module 420, is used for:
According to the colouring information, the vector artwork is shown.
In the embodiment of the present invention, due to being to use ttf font files, arbitrarily enlarged to vector artwork progress all can will not
It is fuzzy, so only storage portion ttf font files can adapt to the screen of high DPI, the number without storing two parts of icons
According to so the storage resource occupied is fewer.And by word render component, various patterns are rendered, rendering efficiency is relatively high.
It should be noted that:The device for the display icon that above-described embodiment provides is when showing icon, only with above-mentioned each work(
Can module division progress for example, in practical application, can be as needed and by above-mentioned function distribution by different functions
Module is completed, i.e., the internal structure of device is divided into different function modules, described above all or part of to complete
Function.In addition, the device for the display icon that above-described embodiment provides and the embodiment of the method for display icon belong to same design,
Specific implementation process refers to embodiment of the method, and which is not described herein again.
Fig. 5 shows the structure diagram for the mobile terminal 500 that an illustrative embodiment of the invention provides.The mobile terminal
500 can be:Smart mobile phone, tablet computer, MP3 player (Moving Picture Experts Group Audio
Layer III, dynamic image expert's compression standard audio level 3), MP4 (Moving Picture Experts Group
Audio Layer IV, dynamic image expert's compression standard audio level 4) player, laptop or desktop computer.It is mobile
Terminal 500 be also possible to be referred to as user equipment, portable mobile termianl, mobile terminal on knee, desktop movable terminal etc. other
Title.
In general, mobile terminal 500 includes:Processor 501 and memory 502.
Processor 501 may include one or more processing cores, such as 4 core processors, 8 core processors etc..Place
DSP (Digital Signal Processing, Digital Signal Processing), FPGA (Field- may be used in reason device 501
Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array, may be programmed
Logic array) at least one of example, in hardware realize.Processor 501 can also include primary processor and coprocessor, master
Processor is the processor for being handled data in the awake state, also referred to as CPU (Central Processing
Unit, central processing unit);Coprocessor is the low power processor for being handled data in the standby state.?
In some embodiments, processor 501 can be integrated with GPU (Graphics Processing Unit, image processor),
GPU is used to be responsible for the rendering and drafting of content to be shown needed for display screen.In some embodiments, processor 501 can also wrap
AI (Artificial Intelligence, artificial intelligence) processor is included, the AI processors are for handling related machine learning
Calculating operation.
Memory 502 may include one or more computer readable storage mediums, which can
To be non-transient.Memory 502 may also include high-speed random access memory and nonvolatile memory, such as one
Or multiple disk storage equipments, flash memory device.In some embodiments, the non-transient computer in memory 502 can
Storage medium is read for storing at least one instruction, at least one instruction is for performed to realize this Shen by processor 501
Please in embodiment of the method provide display figure calibration method.
In some embodiments, mobile terminal 500 is also optional includes:Peripheral device interface 503 and at least one periphery
Equipment.It can be connected by bus or signal wire between processor 501, memory 502 and peripheral device interface 503.It is each outer
Peripheral equipment can be connected by bus, signal wire or circuit board with peripheral device interface 503.Specifically, peripheral equipment includes:It penetrates
At least one in frequency circuit 504, touch display screen 505, camera 506, voicefrequency circuit 507, positioning component 508 and power supply 509
Kind.
Peripheral device interface 503 can be used for I/O (Input/Output, input/output) is relevant at least one outer
Peripheral equipment is connected to processor 501 and memory 502.In some embodiments, processor 501, memory 502 and peripheral equipment
Interface 503 is integrated on same chip or circuit board;In some other embodiments, processor 501, memory 502 and outer
Any one or two in peripheral equipment interface 503 can realize on individual chip or circuit board, the present embodiment to this not
It is limited.
Radio circuit 504 is for receiving and emitting RF (Radio Frequency, radio frequency) signal, also referred to as electromagnetic signal.It penetrates
Frequency circuit 504 is communicated by electromagnetic signal with communication network and other communication equipments.Radio circuit 504 turns electric signal
It is changed to electromagnetic signal to be sent, alternatively, the electromagnetic signal received is converted to electric signal.Optionally, radio circuit 504 wraps
It includes:Antenna system, RF transceivers, one or more amplifiers, tuner, oscillator, digital signal processor, codec chip
Group, user identity module card etc..Radio circuit 504 can by least one wireless communication protocol come with other mobile terminals
It is communicated.The wireless communication protocol includes but not limited to:Metropolitan Area Network (MAN), each third generation mobile communication network (2G, 3G, 4G and 5G), nothing
Line LAN and/or WiFi (Wireless Fidelity, Wireless Fidelity) network.In some embodiments, radio circuit 504
Can also include the related circuits of NFC (Near Field Communication, wireless near field communication), the application to this not
It is limited.
Display screen 505 is for showing UI (User Interface, user interface).The UI may include figure, text, figure
Mark, video and its their arbitrary combination.When display screen 505 is touch display screen, display screen 505 also there is acquisition to show
The ability of the surface of screen 505 or the touch signal of surface.The touch signal can be used as control signal to be input to processor
501 are handled.At this point, display screen 505 can be also used for providing virtual push button and/or dummy keyboard, also referred to as soft button and/or
Soft keyboard.In some embodiments, display screen 505 can be one, and the front panel of mobile terminal 500 is arranged;In other realities
It applies in example, display screen 505 can be at least two, be separately positioned on the different surfaces of mobile terminal 500 or in foldover design;?
In still other embodiments, display screen 505 can be flexible display screen, be arranged on the curved surface of mobile terminal 500 or fold
On face.Even, display screen 505 can also be arranged to non-rectangle irregular figure, namely abnormity screen.Display screen 505 can be adopted
With LCD (Liquid Crystal Display, liquid crystal display), (Organic Light-Emitting Diode, have OLED
Machine light emitting diode) etc. materials prepare.
CCD camera assembly 506 is for acquiring image or video.Optionally, CCD camera assembly 506 include front camera and
Rear camera.In general, the front panel in mobile terminal is arranged in front camera, the back of the body in mobile terminal is arranged in rear camera
Face.In some embodiments, rear camera at least two, be respectively main camera, depth of field camera, wide-angle camera,
Any one in focal length camera, to realize that main camera and the fusion of depth of field camera realize background blurring function, main camera shooting
Head and wide-angle camera fusion realize pan-shot and VR (Virtual Reality, virtual reality) shooting functions or its
It merges shooting function.In some embodiments, CCD camera assembly 506 can also include flash lamp.Flash lamp can be monochromatic
Warm flash lamp can also be double-colored temperature flash lamp.Double-colored temperature flash lamp refers to the combination of warm light flash lamp and cold light flash lamp, can
For the light compensation under different-colour.
Voicefrequency circuit 507 may include microphone and loud speaker.Microphone is used to acquire the sound wave of user and environment, and will
Sound wave, which is converted to electric signal and is input to processor 501, to be handled, or is input to radio circuit 504 to realize voice communication.
For stereo acquisition or the purpose of noise reduction, microphone can be multiple, be separately positioned on the different parts of mobile terminal 500.
Microphone can also be array microphone or omnidirectional's acquisition type microphone.Loud speaker is then used to that processor 501 or radio frequency will to be come from
The electric signal of circuit 504 is converted to sound wave.Loud speaker can be traditional wafer speaker, can also be that piezoelectric ceramics is raised one's voice
Device.When loud speaker is piezoelectric ceramic loudspeaker, the audible sound wave of the mankind can be not only converted electrical signals to, can also be incited somebody to action
Electric signal is converted to the sound wave that the mankind do not hear to carry out the purposes such as ranging.In some embodiments, voicefrequency circuit 507 can be with
Including earphone jack.
Positioning component 508 is used to position the current geographic position of mobile terminal 500, to realize navigation or LBS (Location
Based Service, location based service).Positioning component 508 can be the GPS (Global based on the U.S.
Positioning System, global positioning system), the dipper system of China, Russia Gray receive this system or European Union
The positioning component of Galileo system.
Power supply 509 is used to be powered for the various components in mobile terminal 500.Power supply 509 can be alternating current, direct current
Electricity, disposable battery or rechargeable battery.When power supply 509 includes rechargeable battery, which can support wired
Charging or wireless charging.The rechargeable battery can be also used for supporting fast charge technology.
In some embodiments, mobile terminal 500 further include there are one or multiple sensors 510.The one or more passes
Sensor 510 includes but not limited to:Acceleration transducer 511, gyro sensor 512, pressure sensor 513, fingerprint sensor
514, optical sensor 515 and proximity sensor 516.
Acceleration transducer 511 can detect the acceleration in three reference axis of the coordinate system established with mobile terminal 500
Spend size.For example, acceleration transducer 511 can be used for detecting component of the acceleration of gravity in three reference axis.Processor
The 501 acceleration of gravity signals that can be acquired according to acceleration transducer 511, control touch display screen 505 with transverse views or
Longitudinal view carries out the display of user interface.Acceleration transducer 511 can be also used for game or the exercise data of user
Acquisition.
Gyro sensor 512 can detect body direction and the rotational angle of mobile terminal 500, gyro sensor
512 can cooperate with acquisition user to act the 3D of mobile terminal 500 with acceleration transducer 511.Processor 501 is according to gyroscope
The data that sensor 512 acquires, may be implemented following function:Action induction (for example changed according to the tilt operation of user
Image stabilization, game control when UI), shooting and inertial navigation.
The lower layer of side frame and/or touch display screen 505 in mobile terminal 500 can be arranged in pressure sensor 513.When
The gripping signal that user can be detected in the side frame of mobile terminal 500 to mobile terminal 500 is arranged in pressure sensor 513,
Right-hand man's identification or prompt operation are carried out according to the gripping signal that pressure sensor 513 acquires by processor 501.Work as pressure sensing
Device 513 is arranged in the lower layer of touch display screen 505, is grasped to the pressure of touch display screen 505 according to user by processor 501
Make, realization controls the operability control on the interfaces UI.Operability control include button control, scroll bar control,
At least one of icon control, menu control.
Fingerprint sensor 514 is used to acquire the fingerprint of user, collected according to fingerprint sensor 514 by processor 501
The identity of fingerprint recognition user, alternatively, by fingerprint sensor 514 according to the identity of collected fingerprint recognition user.It is identifying
When the identity for going out user is trusted identity, the user is authorized to execute relevant sensitive operation, the sensitive operation packet by processor 501
Include solution lock screen, check encryption information, download software, payment and change setting etc..Movement can be set in fingerprint sensor 514
Front, the back side or the side of terminal 500.When being provided with physical button or manufacturer Logo on mobile terminal 500, fingerprint sensor
514 can integrate with physical button or manufacturer Logo.
Optical sensor 515 is for acquiring ambient light intensity.In one embodiment, processor 501 can be according to optics
The ambient light intensity that sensor 515 acquires controls the display brightness of touch display screen 505.Specifically, when ambient light intensity is higher
When, the display brightness of touch display screen 505 is turned up;When ambient light intensity is relatively low, the display for turning down touch display screen 505 is bright
Degree.In another embodiment, the ambient light intensity that processor 501 can also be acquired according to optical sensor 515, dynamic adjust
The acquisition parameters of CCD camera assembly 506.
Proximity sensor 516, also referred to as range sensor are generally arranged at the front panel of mobile terminal 500.Proximity sensor
516 the distance between the front for acquiring user and mobile terminal 500.In one embodiment, when proximity sensor 516 is examined
When measuring the distance between the front of user and mobile terminal 500 and tapering into, touch display screen 505 is controlled by processor 501
It is switched to breath screen state from bright screen state;When proximity sensor 516 detect between user and the front of mobile terminal 500 away from
When from becoming larger, touch display screen 505 being controlled by processor 501 and is switched to bright screen state from breath screen state.
It will be understood by those skilled in the art that structure shown in Fig. 5 does not constitute the restriction to mobile terminal 500, it can
To include either combining certain components than illustrating more or fewer components or being arranged using different components.
One of ordinary skill in the art will appreciate that realizing that all or part of step of above-described embodiment can pass through hardware
It completes, relevant hardware can also be instructed to complete by program, the program can be stored in a kind of computer-readable
In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all the present invention spirit and
Within principle, any modification, equivalent replacement, improvement and so on should all be included in the protection scope of the present invention.
Claims (10)
1. a kind of display figure calibration method, which is characterized in that the method is applied to the screen of mobile terminal, the mobile terminal
Including word render component, the method includes:
Obtain the dots per inch DPI of the screen;
If the DPI is not equal to preset value, by the word render component, obtained from preset ttf font files
The corresponding vector artwork of icon to be shown,
According to the DPI, the vector artwork is shown.
2. according to the method described in claim 1, it is characterized in that, it is described obtained from preset ttf font files it is to be shown
The corresponding vector artwork of icon, including:
According to the unicode characters of icon to be shown, the unicode characters are obtained from the preset ttf font files
Corresponding vector artwork.
3. according to the method described in claim 1, it is characterized in that, described according to the DPI, the vector artwork is shown
Show, including:
According to the DPI, the vector artwork is zoomed in and out, the vector artwork after scaling is shown.
4. according to the method described in claim 3, it is characterized in that, described according to the DPI, contract to the vector artwork
It puts, the vector artwork after scaling is shown, including:
According to the DPI, the font height of the unicode characters of the icon to be shown is determined;
According to the font height, the vector artwork is zoomed in and out;
Vector artwork after scaling is shown.
5. method according to any one of claims 1 to 4, which is characterized in that the method further includes:
Obtain the corresponding colouring information of the icon to be shown;
It is described that the vector artwork is shown, including:
According to the colouring information, the vector artwork is shown.
6. a kind of device of display icon, which is characterized in that described device is applied to the screen of mobile terminal, the mobile terminal
Including word render component, described device includes:
Acquisition module, the dots per inch DPI for obtaining the screen;If the DPI is not equal to preset value, pass through institute
Word render component is stated, the corresponding vector artwork of icon to be shown is obtained from preset ttf font files,
Display module, for according to the DPI, being shown to the vector artwork.
7. device according to claim 6, which is characterized in that the acquisition module is used for:
According to the unicode characters of icon to be shown, the unicode characters are obtained from the preset ttf font files
Corresponding vector artwork.
8. device according to claim 6, which is characterized in that the display module is used for:
According to the DPI, the vector artwork is zoomed in and out, the vector artwork after scaling is shown.
9. device according to claim 8, which is characterized in that the display module is used for:
According to the DPI, the font height of the unicode characters of the icon to be shown is determined;
According to the font height, the vector artwork is zoomed in and out;
Vector artwork after scaling is shown.
10. according to any device of claim 6 to 9, which is characterized in that the acquisition module is additionally operable to:
Obtain the corresponding colouring information of the icon to be shown;
The display module, is used for:
According to the colouring information, the vector artwork is shown.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810526490.7A CN108734662B (en) | 2018-05-21 | 2018-05-21 | Method and device for displaying icons |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810526490.7A CN108734662B (en) | 2018-05-21 | 2018-05-21 | Method and device for displaying icons |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108734662A true CN108734662A (en) | 2018-11-02 |
CN108734662B CN108734662B (en) | 2023-02-28 |
Family
ID=63936517
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810526490.7A Active CN108734662B (en) | 2018-05-21 | 2018-05-21 | Method and device for displaying icons |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108734662B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109803126A (en) * | 2019-02-22 | 2019-05-24 | 重庆紫光华山智安科技有限公司 | Control method, control terminal and Multi-screen display system for multihead display |
CN111507067A (en) * | 2019-01-31 | 2020-08-07 | 北京易真学思教育科技有限公司 | Acquisition method for displaying formula picture, and method and device for transferring formula picture |
CN111880869A (en) * | 2020-06-17 | 2020-11-03 | 西安万像电子科技有限公司 | Picture adjusting method, device and system |
CN112817667A (en) * | 2019-11-18 | 2021-05-18 | 青岛海信移动通信技术股份有限公司 | Terminal and control icon display method |
CN113360113A (en) * | 2021-05-24 | 2021-09-07 | 中国电子科技集团公司第四十一研究所 | System and method for dynamically adjusting character display width based on OLED screen |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104978183A (en) * | 2015-01-22 | 2015-10-14 | 腾讯科技(深圳)有限公司 | Icon construction method, and terminal equipment |
CN106055295A (en) * | 2016-05-24 | 2016-10-26 | 腾讯科技(深圳)有限公司 | Picture processing method and device, and picture drawing method and device |
CN106383689A (en) * | 2016-09-20 | 2017-02-08 | 青岛海信电器股份有限公司 | Display font size adjustment method and apparatus, and terminal device |
AU2015384100A1 (en) * | 2015-02-26 | 2017-09-28 | Huawei Technologies Co., Ltd. | DPI adaptation method and electronic device |
CN107301046A (en) * | 2017-06-15 | 2017-10-27 | 腾讯科技(深圳)有限公司 | Treating method and apparatus, computer equipment and the storage medium of icon |
CN107704615A (en) * | 2017-10-24 | 2018-02-16 | 北京有字库网络科技有限公司 | Webpage font display methods and system based on Chinese font subset |
-
2018
- 2018-05-21 CN CN201810526490.7A patent/CN108734662B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104978183A (en) * | 2015-01-22 | 2015-10-14 | 腾讯科技(深圳)有限公司 | Icon construction method, and terminal equipment |
AU2015384100A1 (en) * | 2015-02-26 | 2017-09-28 | Huawei Technologies Co., Ltd. | DPI adaptation method and electronic device |
CN106055295A (en) * | 2016-05-24 | 2016-10-26 | 腾讯科技(深圳)有限公司 | Picture processing method and device, and picture drawing method and device |
CN106383689A (en) * | 2016-09-20 | 2017-02-08 | 青岛海信电器股份有限公司 | Display font size adjustment method and apparatus, and terminal device |
CN107301046A (en) * | 2017-06-15 | 2017-10-27 | 腾讯科技(深圳)有限公司 | Treating method and apparatus, computer equipment and the storage medium of icon |
CN107704615A (en) * | 2017-10-24 | 2018-02-16 | 北京有字库网络科技有限公司 | Webpage font display methods and system based on Chinese font subset |
Non-Patent Citations (1)
Title |
---|
KURRYLUO: ""利用阿里巴巴矢量图库 Iconfont 拓展团队使用的图标 —— unicode 方式"", 《HTTPS://WWW.JIANSHU.COM/P/580EED50F693》 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111507067A (en) * | 2019-01-31 | 2020-08-07 | 北京易真学思教育科技有限公司 | Acquisition method for displaying formula picture, and method and device for transferring formula picture |
CN109803126A (en) * | 2019-02-22 | 2019-05-24 | 重庆紫光华山智安科技有限公司 | Control method, control terminal and Multi-screen display system for multihead display |
CN112817667A (en) * | 2019-11-18 | 2021-05-18 | 青岛海信移动通信技术股份有限公司 | Terminal and control icon display method |
CN111880869A (en) * | 2020-06-17 | 2020-11-03 | 西安万像电子科技有限公司 | Picture adjusting method, device and system |
CN113360113A (en) * | 2021-05-24 | 2021-09-07 | 中国电子科技集团公司第四十一研究所 | System and method for dynamically adjusting character display width based on OLED screen |
Also Published As
Publication number | Publication date |
---|---|
CN108734662B (en) | 2023-02-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110827820B (en) | Voice awakening method, device, equipment, computer storage medium and vehicle | |
CN110321126B (en) | Method and device for generating page code | |
CN108563377A (en) | The method and apparatus that switching shows the page | |
CN110046018A (en) | Show method, apparatus, electronic equipment and the medium of message | |
CN110333834A (en) | Frame frequency method of adjustment and device, display equipment, computer readable storage medium | |
CN108734662A (en) | The method and apparatus for showing icon | |
CN108491748B (en) | Graphic code identification and generation method and device and computer readable storage medium | |
CN110362366A (en) | A kind of application interface display methods and device | |
CN110288689A (en) | The method and apparatus that electronic map is rendered | |
CN110121094A (en) | Video is in step with display methods, device, equipment and the storage medium of template | |
CN112749362A (en) | Control creating method, device, equipment and storage medium | |
CN108172176B (en) | Page refreshing method and device for ink screen | |
US20240212114A1 (en) | Method, apparatus, and device for processing image, and storage medium | |
CN110297684A (en) | Theme display methods, device and storage medium based on virtual portrait | |
CN111105474A (en) | Font drawing method and device, computer equipment and computer readable storage medium | |
CN110109770A (en) | Adjustment method, device, electronic equipment and medium | |
CN109614563A (en) | Show method, apparatus, equipment and the storage medium of webpage | |
CN108664300A (en) | A kind of application interface display methods under picture-in-picture mode and device | |
CN112163677B (en) | Method, device and equipment for applying machine learning model | |
CN110414448A (en) | Image processing method, device, electronic equipment and storage medium | |
CN109345447A (en) | The method and apparatus of face replacement processing | |
CN110045999B (en) | Method, device, terminal and storage medium for drawing assembly | |
CN111339735A (en) | Character string length calculation method and device and computer storage medium | |
CN112202966B (en) | Communication information notification method and device and computer readable storage medium | |
CN110069256A (en) | Draw method, apparatus, terminal and the storage medium of component |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |