CN110322538A - Character displaying method, device, storage medium and processor - Google Patents
Character displaying method, device, storage medium and processor Download PDFInfo
- Publication number
- CN110322538A CN110322538A CN201910563653.3A CN201910563653A CN110322538A CN 110322538 A CN110322538 A CN 110322538A CN 201910563653 A CN201910563653 A CN 201910563653A CN 110322538 A CN110322538 A CN 110322538A
- Authority
- CN
- China
- Prior art keywords
- stroke
- point
- display
- profile
- path
- 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
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/20—Drawing from basic elements, e.g. lines or circles
- G06T11/203—Drawing of straight lines or curves
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T13/00—Animation
- G06T13/80—2D [Two Dimensional] animation, e.g. using sprites
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Controls And Circuits For Display Device (AREA)
Abstract
The invention discloses a kind of character displaying method, device, storage medium and processor.Wherein, this method comprises: obtaining the character font data for needing text to be shown;The display profile of the stroke of text is determined according to character font data;The stroke display mode of stroke is determined according to display profile;According to stroke display mode Dynamically Announce stroke;According to the stroke order of text, the stroke of Dynamically Announce text, shows until the stroke of text is whole one by one.The present invention solves in the related technology the manually mode of setting text importing path point, low efficiency, the low technical problem of accuracy rate.
Description
Technical field
The present invention relates to data processing field, in particular to a kind of character displaying method, device, storage medium and
Processor.
Background technique
In electronic whiteboard, more vivid display font can be come by Dynamically Announce font.But the relevant technologies
In, it is usually only capable of displaying a kind of ttf font type, and when showing the ttf font type of the type, need manual delineation road
Diameter point, the path then formed according to the path point, by preset shape with the profile of certain speed filling font, to form dynamic
Show the purpose of the font.But the mode of artificial drawing path point, not only low efficiency, error is big, and labour cost is high.
For above-mentioned problem, currently no effective solution has been proposed.
Summary of the invention
The embodiment of the invention provides a kind of character displaying method, device, storage medium and processor, at least to solve phase
The mode of text importing path point, low efficiency, accuracy rate low technical problem are manually set in the technology of pass.
According to an aspect of an embodiment of the present invention, a kind of character displaying method is provided, comprising: obtaining need to be to be shown
The character font data of text;The display profile of the stroke of the text is determined according to the character font data;According to the display profile
Determine the stroke display mode of the stroke;According to stroke described in the stroke display mode Dynamically Announce;According to the text
Stroke order, the stroke of text described in Dynamically Announce one by one, until the stroke of the text is all shown.
Optionally, the display profile that the stroke of the text is determined according to the character font data includes: according to the font
Data, by determining the path point list of the display profile for determining the system class of the display profile;According to the road
Diameter point list generates the display profile of the stroke of closed loop.
Optionally, determine that the stroke display mode of the stroke includes: according to the path point according to the display profile
Data in list determine starting point and terminating point that stroke shows paths;According to the starting point and the terminating point by institute
Path point list is stated, the first sublist and the second sublist are divided into;The first subpath is determined according to first sublist, according to
Second sublist determines the second subpath;Determine that the stroke is aobvious according to first subpath and second subpath
Show path;Wherein, preset shape shows paths mobile display mode according to the stroke as the stroke display mode.
Optionally, according to the data in the path point list, determine terminating point that the stroke shows paths include: by
The starting point of the display profile in the path point list, the terminating point to show paths as the stroke;Wherein, described
Display profile is complete closed loop profile, and the starting point is the halt of the display profile.
Optionally, according to the data in the path point list, determine that the starting point that the stroke shows paths includes: to obtain
It takes in the path point list, the first datum mark of X-coordinate axle minimum value and the second datum mark of Y axis coordinate minimum value;According to
First datum mark and second datum mark determine the starting point.
Optionally, determine that the starting point includes: described according to first datum mark and second datum mark
In the case that one datum mark and second datum mark are same point, first datum mark or second datum mark are described
Starting point;In the case where first datum mark and second datum mark are not same point, the path point list is determined
In, the point farthest apart from the terminating point is the starting point.
Optionally, according to the data in the path point list, determine that the starting point that the stroke shows paths includes: to obtain
Take the display profile in the path point list the starting point and the halt;In the starting point to halt
Display profile on, determine it is described display profile midpoint;The starting point that the midpoint is showed paths as the stroke.
Optionally, according to first subpath and second subpath determine the stroke show paths include: by
Path point in second sublist of second subpath is inverted sequence, determines third subpath;According to the described first sub- road
Multiple first path points in diameter determine a first path point apart from the smallest by second respectively from the third subpath
Path point;Stroke path point is determined according to the first path point and corresponding second path point;According to the stroke road
Diameter point determines that the stroke shows paths.
Optionally, according to the first path point and corresponding second path point determine stroke path point include: by
Midpoint between the first path point and corresponding second path point is as the stroke path point.
Optionally, according to the stroke show paths stroke described in Dynamically Announce include: by preset base shape according to
Preset movement speed shows paths according to the stroke and fills the display profile of the stroke, with stroke described in Dynamically Announce.
Optionally, determine that the stroke display mode of the stroke includes: to take turns according to the display according to the display profile
Exterior feature determines the intermediate point of the stroke by presetting the coordinate table of size;It determines and amplifies default shape on the basis of the intermediate point
The display mode of shape is the stroke display mode.
Optionally, the intermediate point packet of the stroke is determined by presetting the coordinate table of size according to the display profile
It includes: in the coordinate table, obtaining the display profile;According to certain density, determination is multiple pre- in the display profile
Reconnaissance;The intermediate point is determined according to multiple pre- reconnaissances.
Optionally, determine that the intermediate point includes: according to multiple pre- reconnaissances, according to phase according to multiple pre- reconnaissances
The preset diameters of adjacent two concentric circles are poor, and each pre- reconnaissance is generated using the pre- reconnaissance as multiple concentric circles in the center of circle;From
Middle circle is determined in multiple concentric circles of multiple pre- reconnaissances;The corresponding pre- reconnaissance of the middle circle is described
Intermediate point.
Optionally, determine that middle circle includes: according to described concentric from multiple concentric circles of multiple pre- reconnaissances
Round number of intersections and distance with the display profile, determines the middle circle;Wherein, by judge the concentric circles with it is described
Whether the number of intersections and distance for showing profile meet following condition, determine the middle circle;Meet following condition in concentric circles
At least one in the case where, determine the concentric circles be the middle circle;The number of hits of the concentric circles and the display profile
Amount is two, and two intersection points are the orthogonal points of the concentric circles and the display profile;The concentric circles and the display profile
Number of intersections be three, an intersection point in three intersection points is the orthogonal points of the concentric circles and the display profile, and three
The distance between other two intersection point in a intersection point is less than default error precision;The friendship of the concentric circles and the display profile
Point quantity is four, and four intersection points are adjusted the distance for two is less than the intersection point of default error precision.
Optionally, the stroke of the text according to the stroke display mode Dynamically Announce includes: from the aobvious of the stroke
Show the intermediate point of profile, is amplified with preset shape according to default amplification speed, the profile of the stroke is filled, dynamically to show
Show the stroke.
Optionally, determine that the stroke display mode of the stroke includes: to the display profile according to the display profile
Prototype compression is carried out, determines the person's handwriting line of the display profile;The stroke display mode is determined according to the person's handwriting line.
According to another aspect of an embodiment of the present invention, a kind of character display apparatus is additionally provided, comprising: obtain module, use
The character font data of text to be shown is needed in acquisition;First determining module, for determining the text according to the character font data
Stroke display profile;Second determining module, for determining the stroke display mode of the stroke according to the display profile;
First display module is used for the stroke according to the stroke display mode Dynamically Announce;Second display module, for according to institute
The stroke order of text is stated, one by one the stroke of text described in Dynamically Announce, until the stroke of the text is all shown.
According to another aspect of an embodiment of the present invention, a kind of storage medium is additionally provided, the storage medium includes storage
Program, wherein described program operation when control the storage medium where equipment execute it is any one of above-mentioned described in
Method.
According to another aspect of an embodiment of the present invention, a kind of processor is additionally provided, the processor is used to run program,
Wherein, described program run when execute it is any one of above-mentioned described in method.
In embodiments of the present invention, the character font data of text to be shown is needed using acquisition;Text is determined according to character font data
The display profile of the stroke of word;The stroke display mode of stroke is determined according to display profile;It is aobvious according to stroke display mode dynamic
Show stroke;According to the stroke order of text, the stroke of Dynamically Announce text one by one, until the side that the stroke of text is all shown
Formula, by according to showing that profile automatically determines the stroke of text and show paths, according to the Dynamically Announce stroke that shows paths, thus
Dynamically Announce text has achieved the purpose that avoid manually to be arranged to show paths and has a little caused low efficiency and accuracy rate low, thus real
Show and automatically generated high-efficient, the high technical effect of accuracy rate that shows paths, and then has solved artificial setting in the related technology
The mode of text importing path point, low efficiency, the low technical problem of accuracy rate.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present invention, constitutes part of this application, this hair
Bright illustrative embodiments and their description are used to explain the present invention, and are not constituted improper limitations of the present invention.In the accompanying drawings:
Fig. 1 is the schematic diagram according to a kind of ttf font of the relevant technologies;
Fig. 2 is the filling schematic diagram according to a kind of ttf font of the relevant technologies;
Fig. 3 is a kind of flow chart of according to embodiments of the present invention 1 character displaying method;
Fig. 4 is a kind of flow chart of according to embodiments of the present invention 2 character displaying method;
Fig. 5 is a kind of flow chart of according to embodiments of the present invention 3 character displaying method;
Fig. 6 is a kind of flow chart of according to embodiments of the present invention 4 character displaying method;
Fig. 7 is a kind of flow chart of according to embodiments of the present invention 5 character displaying method;
Fig. 8 is a kind of flow chart of according to embodiments of the present invention 6 character displaying method;
Fig. 9 is a kind of flow chart of according to embodiments of the present invention 7 character displaying method;
Figure 10 is a kind of schematic diagram of the outer rim path point list of according to embodiments of the present invention 8 font;
Figure 11 is a kind of schematic diagram of the stroke shapes of according to embodiments of the present invention 8 font;
Figure 12 is a kind of schematic diagram of two path points of according to embodiments of the present invention 8 font;
Figure 13 is a kind of schematic diagram of the intermediate path point of according to embodiments of the present invention 8 font;
Figure 14 is a kind of schematic diagram of the filling tendency of according to embodiments of the present invention 8 font;
Figure 15 is a kind of schematic diagram of the intermediate point of according to embodiments of the present invention 8 font;
Figure 16 is the schematic diagram of according to embodiments of the present invention 8 a kind of font to show paths;
Figure 17 is the schematic diagram of the practical path of according to embodiments of the present invention 8 another font;
Figure 18 is a kind of schematic diagram of according to embodiments of the present invention 9 font display device.
Specific embodiment
In order to enable those skilled in the art to better understand the solution of the present invention, below in conjunction in the embodiment of the present invention
Attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is only
The embodiment of a part of the invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill people
The model that the present invention protects all should belong in member's every other embodiment obtained without making creative work
It encloses.
It should be noted that description and claims of this specification and term " first " in above-mentioned attached drawing, "
Two " etc. be to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should be understood that using in this way
Data be interchangeable under appropriate circumstances, so as to the embodiment of the present invention described herein can in addition to illustrating herein or
Sequence other than those of description is implemented.In addition, term " includes " and " having " and their any deformation, it is intended that cover
Cover it is non-exclusive include, for example, the process, method, system, product or equipment for containing a series of steps or units are not necessarily limited to
Step or unit those of is clearly listed, but may include be not clearly listed or for these process, methods, product
Or other step or units that equipment is intrinsic.
In the related technology, electronic whiteboard executes following steps when showing certain type of ttf font:
Step 1, Fig. 1 are according to a kind of schematic diagram of ttf font of the relevant technologies, as shown, obtaining Chinese character ttf
Font library file, and show corresponding Chinese character.
Step 2 passes through manually, and multiple points are arranged in each stroke of Chinese character, such as point A (30,50), point B (40,60), with
Record the path that stroke is described.Storing path point data is to configuration file.
Step 3, the path point data for obtaining Chinese character.
On the path that step 4, multiple points are formed, the filled circles of 40 pixel of radius are filled in stroke with given pace
Portion region.Fig. 2 is according to a kind of filling schematic diagram of ttf font of the relevant technologies, and the filling of Chinese character " one " is illustrated such as Fig. 2 institute
Show.
Above-mentioned electronic whiteboard may include touch control device, in the embodiment of this specification, can be intelligent interaction plate,
Also known as interactive intelligent tablet computer, can be by touch technology to be shown in display plate on content manipulated and realized it is man-machine
The integration apparatus of interactive operation is integrated with projector, electronic whiteboard, curtain, sound equipment, television set and video conference terminal
Etc. one or more functions.
Above-mentioned intelligent interaction plate includes display screen, wherein referring in the embodiment of above-mentioned display screen in the present specification
Touch screen, touch screen, touch panel are a kind of induction type liquid crystal display devices, when contacting the graphic button on screen, screen
Haptic feedback system on curtain can drive various connection devices according to the formula of preprogramming, be substituted for mechanical button
Panel, and lively visual and sound effects are produced by liquid crystal display picture.Touch screen is distinguished from technical principle, five can be divided into
A basic kind: vector pressure sensing technology touch screen, resistive technologies touch screen, capacitance technology touch screen, infrared technology touching
Touch screen, surface acoustic wave technique touch screen.According to the working principle of touch screen and the medium of transmission information, touch screen can be divided into
Four types: resistance-type, capacitor induction type, infrared-type and surface acoustic wave type.
Above-mentioned stylus is a kind of tool of small pen shape, for input instruction to computer display screen, mobile device, draw
Chart board etc. has the electronic equipment of touch screen, and user can carry out choosing text according to the touch control operation on the touchscreen of stylus
Part, or drawing.
" display screen " being previously mentioned in the application refers both to the touch screen with touch function of touch control device;Intelligent interaction is flat
Plate shows that some interface refers to that the display screen of intelligent interaction plate shows the interface.
Embodiment 1
According to embodiments of the present invention, a kind of embodiment of the method for character displaying method is provided, it should be noted that attached
The step of process of figure illustrates can execute in a computer system such as a set of computer executable instructions, though also,
So logical order is shown in flow charts, but in some cases, it can be to be different from shown by sequence execution herein
Or the step of description.
Fig. 3 is a kind of flow chart of character displaying method according to an embodiment of the present invention, as shown in figure 3, this method includes
Following steps:
Step S302 obtains the character font data for needing text to be shown;
Step S304 determines the display profile of the stroke of text according to character font data;
Step S306 determines the stroke display mode of stroke according to display profile;
Step S308, according to stroke display mode Dynamically Announce stroke;
Step S310, according to the stroke order of text, the stroke of Dynamically Announce text one by one, until the stroke of text is complete
Portion is shown.
Through the above steps, the character font data of text to be shown is needed using acquisition;Text is determined according to character font data
The display profile of stroke;The stroke display mode of stroke is determined according to display profile;According to stroke display mode Dynamically Announce pen
It draws;According to the stroke order of text, the stroke of Dynamically Announce text one by one, until the mode that the stroke of text is all shown,
By according to showing that profile automatically determines the stroke of text and show paths, according to the Dynamically Announce stroke that shows paths, thus dynamic
State shows text, has achieved the purpose that avoid manually to be arranged to show paths and has a little caused low efficiency and accuracy rate low, to realize
It automatically generates high-efficient, the high technical effect of accuracy rate that shows paths, and then solves artificial setting text in the related technology
Word shows paths mode a little, low efficiency, the low technical problem of accuracy rate.
Above-mentioned need text to be shown can be any type of font, and can be a certain ttf font can also be it
His font, above-mentioned character font data may include all strokes of the text of the type and the shape contour number of each stroke
According to and the text all strokes stroke order, that is to say the stroke sequential write of the font, can be by being obtained from network
It takes, writes standard according to certain fonts and execute, can also be user preset, to meet the use demand of different users.
The display profile of the above-mentioned stroke that text is determined according to above-mentioned character font data, can be through relevant text importing
Module generates the profile of the stroke text and its stroke, can also generate the text and its stroke by image generation module
Contour images can also generate the profile etc. of the stroke of the text by related system class.
It is above-mentioned that the stroke display mode of stroke is determined according to display profile, according to stroke display mode Dynamically Announce stroke,
Above-mentioned stroke display mode can be stroke and show paths, and can also be that stroke is amplified according to certain point to fill the aobvious of stroke
Show the display mode of profile, above-mentioned amplify according to certain point can be in a manner of the display profile for filling stroke according to stroke
Show that profile generates person's handwriting line during writing the outline strokes, above-mentioned person's handwriting line can show paths work with above-mentioned stroke
With similar, it is believed that above-mentioned person's handwriting line is that above-mentioned stroke shows paths.
The stroke display mode that above-mentioned stroke is automatically determined according to display profile, according to the stroke display mode automatic dynamic
Show the stroke, compared to the mode of the practical path point of manual delineation stroke in the related technology, more efficient speed is faster, quasi-
True rate is higher.
Above-mentioned Dynamically Announce stroke can consider that the Dynamically Announce of the stroke is completed, the case where the stroke is the text
Under, it that is to say that above-mentioned text is one, for the stroke.The dynamic that the Dynamically Announce of the stroke completes also just to represent the text is aobvious
Show completion, but mostly text all not only one, in the case where the stroke number of text is more, according to stroke order
More stroke difference Dynamically Announces are completed, until the finishing touch stroke Dynamically Announce completion of the text, the dynamic of the text
Display is completed.
It should be noted that above-mentioned more texts are during Dynamically Announce, the Dynamically Announce of each stroke be can be
Start to show in above-mentioned some synchronizations for drawing Dynamically Announce completion, which can more simulate the dynamic of strokes of characters
Forming process;It can also be after upper some pictures start display, start to show at the time of not showing completion, can effectively mention
The speed of the Dynamically Announce of the high text, to improve display efficiency;Can also be it is upper it is some picture in limited time complete after etc.
The scheduled moment shows again, most can really simulate the dynamic formation process of strokes of characters.
Embodiment 2
According to embodiments of the present invention 2, another font display methods is provided, Fig. 4 is the one of according to embodiments of the present invention 2
The flow chart of kind character displaying method, as shown in Figure 4, it should be noted that the present embodiment is specific on the basis of embodiment 1
Refinement, the display profile for determining the stroke of text according to character font data include:
Step S402, according to character font data, by determining the path of display profile for determining the system class of display profile
Point list;
Step S404 generates the display profile of the stroke of closed loop according to path point list.
Above system class can be GraphicsPath system class, and the available rendering of the GraphicsPath system class needs
Stroke to be shown, minimal number of path point list.Above-mentioned path point list includes on the display profile of multiple above-mentioned strokes
Point coordinate, the display profile of the stroke needs to can be plane coordinates based on a system coordinate system during display
System, the various coordinate systems such as polar coordinate system, in coordinate system, according to the path point of display profile, label shows multiple points of profile,
Then above-mentioned multiple path points are smoothly connected according to certain algorithm.To realize the purpose for the display profile for showing above-mentioned stroke.
The display profile of above-mentioned stroke is closed loop, that is to say that the starting point of above-mentioned display profile and halt are overlapped.It is above-mentioned
Display profile is that stroke can be filled up completely above-mentioned display wheel library during Dynamically Announce above-mentioned stroke, with realization pair
The Dynamically Announce of above-mentioned stroke, in the case where above-mentioned display profile is open loop, it is possible to lead to not fill and render above-mentioned
The display profile of stroke causes Dynamically Announce stroke to fail.
Optionally, according to display profile determine stroke stroke display mode include: according to the data in the point list of path,
Determine the starting point and terminating point that stroke shows paths;According to starting point and terminating point by path point list, it is divided into the first son column
Table and the second sublist;The first subpath is determined according to the first sublist, and the second subpath is determined according to the second sublist;According to
First subpath and the second subpath determine that stroke shows paths;Wherein, preset shape shows paths mobile aobvious according to stroke
Show that mode is stroke display mode.
Data in above-mentioned path point list are the point on above-mentioned display profile, above-mentioned stroke show paths be for
During the above-mentioned stroke of Dynamically Announce, movement is showed paths to fill above-mentioned display wheel according to the stroke by a certain base shape
Exterior feature forms the effect of the above-mentioned stroke of Dynamically Announce.
Above-mentioned stroke, which shows paths, can be the middle line of the display profile of above-mentioned stroke, but in many fonts, stroke
Show that profile is not a kind of regular shape, the stroke quantity of symmetric shape is less, therefore the middle line of above-mentioned display profile is as pen
Picture shows paths, and there are biggish limitations during realization.
A kind of generation method that stroke shows paths is present embodiments provided, according to the path point range on above-mentioned display profile
Table generates above-mentioned stroke and shows paths.The starting point and halt to show paths firstly the need of the above-mentioned stroke of determination, needs to illustrate
, the starting point and terminating point that above-mentioned stroke shows paths be different from the starting point and ending point of above-mentioned display profile.It is above-mentioned
The starting point that stroke shows paths can be defined according to starting end and clearing end of the writing style to stroke, certain above-mentioned limit
Fixed is also that can be set for changing by user.
After the initial point and terminal of above-mentioned stroke determine, path point list is divided into two son column according to initial point and terminal
Table, for example, above-mentioned one horizontal display profile can be divided into two by above-mentioned initial point and terminal by taking a horizontal display profile as an example
Point, it is the first sublist that part on the upper side, which shows the path point that profile is included, and part on the lower side shows the road that profile is included
Diameter point is the second sublist, and above-mentioned initial point can correspond to the first sublist or correspond to the second sublist, however, it is desirable to press
According to certain rule, for example, in the case where showing the path point of profile according to arranged clockwise, corresponding first sublist of initial point, then
Terminal corresponds to the second sublist, and corresponding second sublist of initial point, then terminal corresponds to the first sublist.
Optionally, according to the data in the point list of path, determine that the terminating point that stroke shows paths includes: by path point range
The starting point of display profile in table, the terminating point to show paths as stroke;Wherein, display profile is complete closed loop profile,
Starting point is the halt for showing profile.It that is to say the end that the halt of above-mentioned display profile shows paths as above-mentioned stroke
Stop.
Embodiment 3
According to embodiments of the present invention 3, another font display methods is provided, Fig. 5 is the one of according to embodiments of the present invention 3
The flow chart of kind character displaying method, as shown in Figure 5, it should be noted that the present embodiment is specific on the basis of embodiment 2
Refinement, according to the data in the point list of path, the starting point for determining that stroke shows paths includes:
Step S502, in acquisite approachs point list, the first datum mark of X-coordinate axle minimum value and Y axis coordinate minimum value
Second datum mark;
Step S504 determines starting point according to the first datum mark and the second datum mark.
In the case that above-mentioned stroke is different, determines that the mode of starting point is different, pen is determined according to stroke writing style first
Then the starting end of picture determines the presentation direction of starting end, according to presentation direction, determine on the presentation direction apart from writing end
Two nearest path points, determine above-mentioned starting point according to above-mentioned two path point, for example, in the case where stroke is perpendicular,
In the case that the type of the font is regular script, according to the writing style of calligraphy, the first stroke of a Chinese character for erecting stroke is on upper left side, to the right
, therefore for erecting stroke, it determines in the path point list of stroke, X-axis minimum (most left), two roads of Y-axis maximum (most upper)
Diameter point determines above-mentioned starting point according to above-mentioned two path point.It should be noted that the starting point of above-mentioned perpendicular stroke is also possible to
X-axis maximum (most right), Y-axis maximum (most upper), i.e., two path points in the upper right side of above-mentioned perpendicular stroke can also be Y-axis maximum
Two path points of (most upper), or other path points etc..
In the present embodiment, in the case where stroke is horizontal, in acquisite approachs point list, the first of X-coordinate axle minimum value
Second datum mark of datum mark and Y axis coordinate minimum value determines starting point according to the first datum mark and the second datum mark.
Optionally, determine that starting point includes: in the first datum mark and the second base according to the first datum mark and the second datum mark
In the case where being same point on schedule, the first datum mark or the second datum mark are starting point;In the first datum mark and the second datum mark
It in the case where not for same point, determines in the point list of path, the point farthest apart from terminating point, is starting point.
Determine that above-mentioned starting point can be in the first datum mark and second according to above-mentioned first datum mark and the second datum mark
In the case that datum mark is same point, the first datum mark or the second datum mark are starting point or the first datum mark and the second base
It is on schedule starting point.In the case where the first datum mark and the second datum mark are not same point, determine in the point list of path, away from
The point farthest from terminating point is starting point.
Optionally, according to the data in the point list of path, determine that the starting point that stroke shows paths includes: to acquisite approachs point
The starting point of display profile in list, display profile are complete closed loop profile, and starting point is the halt for showing profile;It is rising
On initial point to the display profile of terminating point, the midpoint of display profile is determined;The starting point that midpoint is showed paths as stroke.
The display profile of above-mentioned stroke display when can be shown according to the closed loop path of certain sequence, for example,
Above-mentioned display wheel is gradually shown according to closed loop path along display profile with certain orientation with the starting point of above-mentioned display profile
Exterior feature, for example, direction clockwise or counter-clockwise.Progress is drawn by the half of above-mentioned closed loop path, obtains above-mentioned display
The midpoint of profile all can specifically may be used as the starting point that stroke shows paths by function of increasing income, any line/shape
To obtain corresponding point by a certain specific drafting progress.By the above-mentioned means, it is easier to determine that above-mentioned stroke shows paths
Fast.
Under the contour path of a complete closed loop of stroke, in the 50% progress position of drafting of this path-line, one is obtained
Midpoint.The starting point to show paths using midpoint as stroke.It should be noted that aforesaid way has certain error, for example, by
In the two sides of stroke, there may be uneven lines, are such as bent, leading to above-mentioned midpoint is not real starting point, but is being drawn
When stroke processed is shown, the diameter of pen can be drawn by increasing, it is possible to reduce such error.
Embodiment 4
According to embodiments of the present invention 4, another font display methods is provided, Fig. 6 is the one of according to embodiments of the present invention 4
The flow chart of kind character displaying method, as shown in Figure 6, it should be noted that the present embodiment is specific on the basis of embodiment 2
Refinement, determining that stroke shows paths according to the first subpath and the second subpath includes:
Path point in second sublist of the second subpath is inverted sequence, determines third subpath by step S602;
Step S604 determines the according to multiple first path points in the first subpath respectively from third subpath
One path point is apart from the smallest second path point;
Step S606 determines stroke path point according to first path point and corresponding second path point;
Step S608 determines that stroke shows paths according to stroke path point.
Above-mentioned first subpath and the second subpath are identical according to the closed loop direction of display profile, but for above-mentioned
Stroke shows paths, above-mentioned first subpath and the second subpath it is contrary, therefore by the second of above-mentioned second subpath
Path point in sublist is inverted sequence, so that above-mentioned first subpath and the second subpath showed paths for above-mentioned stroke
Direction is identical.
According to multiple first path points of above-mentioned first subpath and multiple second path points of the second subpath, in determination
Multiple stroke path points that stroke shows paths are stated, it can be there are many mode, in the present embodiment, by first will be above-mentioned first sub
The first path of path and the second subpath point and the second path point are matched, i.e., above-mentioned according to multiple in the first subpath
First path point determines a first path point apart from the smallest second path point respectively from third subpath.
Then using the midpoint between first path point and corresponding second path point as stroke path point.Optionally, root
Determine that stroke path point includes: by first path point and corresponding second path according to first path point and corresponding second path point
Midpoint between point is as stroke path point.
It according to above-mentioned stroke path point according to certain algorithm or function, is smoothly connected, generates above-mentioned stroke and show paths.
It optionally, include: by preset base shape according to preset shifting according to the stroke Dynamically Announce stroke that shows paths
Dynamic speed, shows paths according to stroke and fills the display profile of stroke, with Dynamically Announce stroke.
Above-mentioned base shape can be circle, and the regular geometric shapes such as square can also be the shape of user preset, example
Such as, heart-shaped, flower-shape, star etc., other irregular shapes.
Embodiment 5
According to embodiments of the present invention 5, another font display methods is provided, Fig. 7 is the one of according to embodiments of the present invention 5
The flow chart of kind character displaying method, as shown in Figure 7, it should be noted that the present embodiment is specific on the basis of embodiment 1
Refinement, the stroke display mode for determining stroke according to display profile include:
Step S702 determines the intermediate point of stroke according to display profile by presetting the coordinate table of size;
Step S704 determines that the display mode for amplifying preset shape on the basis of intermediate point is stroke display mode.
Above-mentioned stroke display mode can also be on the basis of intermediate point, amplify preset shape to fill the display wheel of stroke
Exterior feature carrys out Dynamically Announce stroke as stroke display mode.
Above-mentioned stroke display mode most importantly determines that above-mentioned stroke is shown in profile according to the display profile of stroke
Between point.It should be noted that the display profile of above-mentioned stroke is not largely symmetric shape or regular geometric shapes,
Therefore the intermediate point of display profile above-mentioned for determination, can be by other means.
In the present embodiment, optionally, the centre of stroke is determined by presetting the coordinate table of size according to display profile
Point includes: to obtain display profile in above-mentioned coordinate table;According to certain density, multiple pre- reconnaissances are determined in display profile;
Intermediate point is determined according to multiple pre- reconnaissances.
Above-mentioned coordinate table can be the coordinate system carried in the interface of above-mentioned display profile, can also be in order in determination
State the coordinate system of intermediate point foundation.Above-mentioned certain density, can be and be distributed according to regular fashion, for example, arranging according to ranks, often
One unit area, one pre- reconnaissance, can also be random distribution, to adapt to more situations.
Optionally, determine that intermediate point includes: according to multiple pre- reconnaissances, according to two neighboring concentric circles according to multiple pre- reconnaissances
Preset diameters it is poor, each pre- reconnaissance is generated using pre- reconnaissance as multiple concentric circles in the center of circle;From the multiple concentric of multiple pre- reconnaissances
Middle circle is determined in circle;The corresponding pre- reconnaissance of middle circle is intermediate point.
Above-mentioned intermediate point includes geometric center position and basic geometry, above-mentioned intermediate point be with area, shape and
The intermediate point of position, above-mentioned geometry can be circle, square, equilateral triangle etc., in the present embodiment for convenience, selection
It is round.Above-mentioned intermediate point includes center location and substantially round diameter.
Above-mentioned multiple concentric circles according to multiple pre- reconnaissances determine that there are many mode of above-mentioned middle circle, can by judgement with
Above-mentioned stroke shows the overlapping area of profile, or the modes such as intersection point for judging concentric circle contour and above-mentioned display profile, to upper
Middle circle is stated to determine.
Embodiment 6
According to embodiments of the present invention 6, another font display methods is provided, Fig. 8 is the one of according to embodiments of the present invention 6
The flow chart of kind character displaying method, as shown in Figure 8, it should be noted that the present embodiment is specific on the basis of embodiment 5
Refinement determines that middle circle includes: from multiple concentric circles of multiple pre- reconnaissances
Step S802 determines middle circle according to the number of intersections and distance of concentric circles and display profile;Wherein, by sentencing
Whether the number of intersections and distance of disconnected concentric circles and display profile meet following condition, determine middle circle;Under concentric circles satisfaction
In the case where at least one column condition, determine that concentric circles is middle circle;
The number of intersections of step S8021, concentric circles and display profile is two, and two intersection points are concentric circles and display profile
Orthogonal points;
The number of intersections of step S8023, concentric circles and display profile is three, and an intersection point in three intersection points is concentric
The orthogonal points of circle and display profile, and the distance between other two intersection point in three intersection points is less than default error precision;
The number of intersections of step S8025, concentric circles and display profile is four, and four intersection points are adjusted the distance for two less than default
The intersection point of error precision.
It is above-mentioned same by being determined to concentric circles with the distance between the number of intersections and intersection point for showing profile in the present embodiment
Whether heart circle meets the condition of middle circle, to determine middle circle, it should be noted that determining intermediate point according to aforesaid way
In the case that quantity is multiple, above-mentioned intermediate point can be determined by second selecting, for example, concentric circles is overlapped with profile is shown
Area then selects the maximum concentric circles of area as middle circle;The geometric center in the center of circle and font display area of concentric circles
Distance determines, then selects to determine middle circle as modes such as middle circles apart from nearest concentric circles.
Above-mentioned default error precision can be 2~5 unit lengths in the reference axis of the display profile.For example, 2
A unit length, 3 unit lengths, 4 unit lengths, 5 unit lengths etc..To guarantee the middle circle and show the friendship of profile
The registration of point is within a certain error range, so that it is guaranteed that the accuracy of middle circle.
It optionally, include: from the centre of the display profile of stroke according to the stroke of stroke display mode Dynamically Announce text
Point is amplified according to default amplification speed with preset shape, the profile of stroke is filled, with Dynamically Announce stroke.
Above-mentioned preset shape can be circle, and the regular geometric shapes such as square can also be the shape of user preset, example
Such as, heart-shaped, flower-shape, star etc., other irregular shapes.
Embodiment 7
According to embodiments of the present invention 7, another font display methods is provided, Fig. 9 is the one of according to embodiments of the present invention 7
The flow chart of kind character displaying method, as shown in Figure 9, it should be noted that the present embodiment is specific on the basis of embodiment 1
Refinement, the stroke display mode for determining stroke according to display profile include:
Step S902 carries out prototype compression to display profile, determines the person's handwriting line of display profile;
Step S904 determines stroke display mode according to person's handwriting line.
It is above-mentioned that prototype compression is carried out to display profile, it can be realized by certain mathematical way, by above-mentioned display profile
One person's handwriting line of boil down to can be according to above-mentioned to fill with the movement of above-mentioned person's handwriting line by pre-set image according to above-mentioned person's handwriting line
Line profile can also be above-mentioned person's handwriting line gradually anti-compress mode, broaden, gradually fills above-mentioned display profile.
Above-mentioned pre-set image can be circle, the regular geometric shapes such as square;It can also be the shape of user preset, example
Such as, heart-shaped, flower-shape, star etc., other irregular shapes;It can also be preset character image, for example, identical with the font
Font, or the font different from the font.
Embodiment 8
According to embodiments of the present invention 8, providing a kind of user can be with the side of unrestricted choice Chinese-character stroke animation font style
Method is below described in detail the embodiment as the optional embodiment of the present embodiment.
The step of this method, is as follows:
1, Chinese character related data is obtained:
1.1 font types selected according to user, obtaining ttf font file, (font of system such as Microsoft is refined black or soft
The customized font style of part).
1.2 obtain the stroke order of Chinese character, such as: " thing " 71356024.
1.3 obtain the stroke code Code of Chinese character, such as: " thing " 12515112 (1 represents cross, and 2 represent perpendicular, 3 representative slashes, 4 generations
Table right-falling stroke/point, 5 represent folding).
2, animation path point list is calculated;
2.1 load ttf fonts, obtain the character font data of Chinese character.
2.2 loads Chinese character (such as " one " i.e. stroke " cross "), by system class GraphicsPath, acquisition can render aobvious
Show stroke, required minimal number of point list.Figure 10 is a kind of outer rim path of font of embodiment according to the present invention
The outer rim path point of the schematic diagram of point list, Chinese character " one " is as shown in Figure 10.
2.3 simultaneously, by system class GraphicsPath, calculates stroke shapes path, the path of a closed loop.Figure 11
It is a kind of schematic diagram of the stroke shapes of font of embodiment according to the present invention, stroke shapes such as Figure 11 of above-mentioned font " one "
It is shown.
2.4 calculate the substantially intermediate point list in stroke shapes.
2.4.1 Chinese-character stroke animation terminating point, i.e. terminating point E in the outer rim path point list of Chinese character) are obtained.Such as Chinese character
Starting point (272.724609375,133.007812) in the outer rim path point of " one "
2.4.2 Chinese-character stroke animation starting point S) is obtained.
In to acquisite approachs point list, the point A of X axis coordinate minimum value and the point B of Y axis coordinate minimum value.
It is the same point if A and B, then is animation starting point.If not the same point, then count
This sorting position in the point list of path is calculated, the point nearest from middle position is then animation starting point.
2.4.3 path point list) is divided by two sublist L1 and L2, first son according to starting point S and terminating point E
List L1 carries out inversion sequence.Figure 12 is a kind of schematic diagram of two path points of font of embodiment according to the present invention, the Chinese
Two path point lists of word " one " are as shown in figure 12:
2.4.4 the path L1 point list) is recycled, each point finds the smallest point of a mutual distance in L2 list.Output
Intermediate path point list, Figure 13 are a kind of schematic diagram of the intermediate path point of font of embodiment according to the present invention, Chinese character
The intermediate path point of " one " is as shown in figure 13.
3, the intermediate path point list obtained later according to step as above demonstrates stroke animation.
On the path that multiple points are formed, the filled circles of 40 pixel of radius fill stroke inner area with given pace
Domain.Figure 14 is a kind of schematic diagram of the filling tendency of font of embodiment according to the present invention, and as shown in figure 14, filling tendency is such as
The following figure, specific effect are consistent with the effect picture in related art scheme.
Present embodiment, with prior art the difference lies in that present embodiment realizes the automatic of stroke animation
Change, animation path is generated by algorithm;And the animation path of original scheme in the related technology is artificial semi-automatic configuration.
This implementation have the advantage that solving prior art there are the wrong of certain probability and repeating asking for huge workload
Topic.
Above embodiment is specific as follows there are a kind of alternative solution:
(1) stroke shapes are obtained, in one wide 300 high 300 square lattice, coordinate X-axis, Y-axis maximum value are minimum
It is worth threshold region, such as X:10-100, Y:40-60;Minimum value in acquisition X-axis minimum value, Y-axis minimum value, is named as
MinRect。
(2) in X, Y-axis section, respectively every 5 pixels, a fixed point.Centered on the point, opened from 5 pixel of radius
Begin, every 2 pixel of minor tick, until being more than or equal to MinRect.Period, if the point that the circle drawn intersects with shape shown in step 2.3
Number:
Whether equal to 2, then judging 2 crosspoints is the round orthogonal points with line.
Equal to 3, then a crosspoint is judged whether there is, for the round orthogonal points with line.While other two
Distance between crosspoint is less than error precision value 10, and (subsequent to optimize to algorithm, this error precision value can
It can slightly adjust).
Equal to 4, then 4 crosspoints are calculated, if there are two to adjust the distance less than the point of 10 pixels.
If meeting any condition in conditions above, this point is recorded.Figure 15 is embodiment according to the present invention
A kind of font intermediate point schematic diagram, as shown in figure 15, B point meets intermediate point condition, and A point is not met.
Meanwhile if it is determined that an intermediate point, then other points within surrounding radius 20, then directly skip over.
(3) the intermediate point list that will acquire is ranked up by stroke Code type (Philosophy folding etc.).
There is another alternative solution in above embodiment, specific as follows:
One, by Chinese-character stroke shape, prototype compression is carried out, a line similar with original stroke shapes is obtained, as this
Stroke shows paths, and Figure 16 is the schematic diagram of a kind of font of embodiment according to the present invention to show paths, such as Figure 16 institute
Show, Chinese character " one " shows paths such as figure.Figure 17 is showing for the practical path of another font of embodiment according to the present invention
It is intended to, Chinese character " second " shows paths such as figure.
Two, by system function GraphicsPath, minimum rendering point list is obtained.
Present embodiment solves in the related technology, manual delineation path point, and larger workload is unfamiliar with the operation of business
Personnel, which describe, has certain error rate and the relevant technologies that can only be confined to a kind of ttf font type, is unable to unrestricted choice Chinese character
Font and the problem of show stroke animation.
Embodiment 9
According to embodiments of the present invention 9, a kind of embodiment of font display device is provided, the present embodiment is above-mentioned for implementing
The device of embodiment 1, Figure 18 are a kind of schematic diagrames of according to embodiments of the present invention 9 font display device;As shown in figure 18, originally
Inventive embodiments 9 provide a kind of font display device, comprising: obtain module 1802, the first determining module 1804, second determines
Module 1806, the first display module 1808 and the second display module 1810, are below described in detail the device.
Module 1802 is obtained, for obtaining the character font data for needing text to be shown;First determining module 1804, and it is above-mentioned
It obtains module 1802 to be connected, the display profile of the stroke for determining text according to character font data;Second determining module 1806, with
Above-mentioned first determining module 1804 is connected, for determining the stroke display mode of stroke according to display profile;First display module
1808, it is connected with above-mentioned second determining module 1806, for according to stroke display mode Dynamically Announce stroke;Second display module
1810, it is connected with above-mentioned first display module 1808, for the stroke order according to text, the pen of Dynamically Announce text one by one
It draws, until the stroke of text is all shown.
By above-mentioned apparatus, the character font data of text to be shown is needed using the acquisition of module 1802 is obtained;First determines mould
Block 1804 determines the display profile of the stroke of text according to character font data;Second determining module 1806 determines pen according to display profile
The stroke display mode of picture;First display module 1808 is according to stroke display mode Dynamically Announce stroke;Second display module
1810 according to text stroke order, the stroke of Dynamically Announce text one by one, until the mode that the stroke of text is all shown,
By according to showing that profile automatically determines the stroke of text and show paths, according to the Dynamically Announce stroke that shows paths, thus dynamic
State shows text, has achieved the purpose that avoid manually to be arranged to show paths and has a little caused low efficiency and accuracy rate low, to realize
It automatically generates high-efficient, the high technical effect of accuracy rate that shows paths, and then solves artificial setting text in the related technology
Word shows paths mode a little, low efficiency, the low technical problem of accuracy rate.
Optionally, the first determining module includes: the first determination unit, for being shown by being used to determine according to character font data
Show the system class of profile, determines the path point list of display profile;Generation unit, for generating closed loop according to path point list
The display profile of stroke.
Optionally, the second determining module includes: the second determination unit, for determining according to the data in the point list of path
The starting point and terminating point that stroke shows paths;Division unit, for, by path point list, being divided into according to starting point and terminating point
First sublist and the second sublist;Third determination unit, for determining the first subpath according to the first sublist, according to second
Sublist determines the second subpath;4th determination unit, for determining that stroke is shown according to the first subpath and the second subpath
Path;Wherein, preset shape shows paths mobile display mode according to stroke as stroke display mode.
Optionally, the second determination unit includes: first to determine level-one subelement, for by the display wheel in the point list of path
Wide starting point, the terminating point to show paths as stroke;Wherein, display profile is complete closed loop profile, and starting point is display
The halt of profile.
Optionally, the second determination unit further include: first obtains level-one subelement, in acquisite approachs point list, X to be sat
First datum mark of parameter minimum value and the second datum mark of Y axis coordinate minimum value;Second determines level-one subelement, is used for root
Starting point is determined according to the first datum mark and the second datum mark.
Optionally, second determine that level-one subelement includes: first to determine second level subelement, in the first datum mark and the
In the case that two datum marks are same point, the first datum mark or the second datum mark are starting point;Second determines second level subelement, uses
In in the case where the first datum mark and the second datum mark are not same point, determine in the point list of path, it is farthest apart from terminating point
Point, be starting point.
Optionally, the second determination unit includes: the second acquisition level-one subelement, for the display in acquisite approachs point list
The starting point and halt of profile;Third determines level-one subelement, for the display profile in starting point to halt, determines
Show the midpoint of profile;The starting point that midpoint is showed paths as stroke.
Optionally, the 4th determination unit includes: the 4th determining level-one subelement, for arranging the second son of the second subpath
Path point in table is inverted sequence, determines third subpath;5th determines level-one subelement, for according in the first subpath
Multiple first path points determine a first path point apart from the smallest second path point respectively from third subpath;6th really
Level-one subelement is determined, for determining stroke path point according to first path point and corresponding second path point;7th determines level-one
Subelement, for determining that stroke shows paths according to stroke path point.
Optionally, the 6th determine that level-one subelement includes: that third determines second level subelement, for by first path point and right
The midpoint between the second path point answered is as stroke path point.
Optionally, the first display module includes: the first display unit, is used for preset base shape according to preset shifting
Dynamic speed, shows paths according to stroke and fills the display profile of stroke, with Dynamically Announce stroke.
Optionally, the second determining module includes: the 5th determination unit, for the seat according to display profile by default size
Mark table determines the intermediate point of stroke;6th determination unit, for determining the display for amplifying preset shape on the basis of intermediate point
Mode is stroke display mode.
Optionally, the 5th determination unit includes: that third obtains level-one subelement, for obtaining display in coordinate table
Profile;8th determines level-one subelement, for determining multiple pre- reconnaissances in display profile according to certain density;9th determines
Level-one subelement, for determining intermediate point according to multiple pre- reconnaissances.
Optionally, the 9th determine that level-one subelement includes: to generate second level subelement, for according to multiple pre- reconnaissances, according to
The preset diameters of two neighboring concentric circles are poor, and each pre- reconnaissance is generated using pre- reconnaissance as multiple concentric circles in the center of circle;4th determines
Second level subelement, for determining middle circle from multiple concentric circles of multiple pre- reconnaissances;5th determines second level subelement, is used for
Between circle corresponding pre- reconnaissance be intermediate point.
Optionally, the 4th determine that second level subelement comprises determining that three-level subelement, for according to concentric circles and display profile
Number of intersections and distance, determine middle circle;Wherein, by judge concentric circles and show profile number of intersections and distance whether
Meet following condition, determines middle circle;In the case where concentric circles meets at least one following condition, determine concentric circles for centre
Circle;The number of intersections of concentric circles and display profile is two, and two intersection points are concentric circles and the orthogonal points for showing profile;Concentric circles
Number of intersections with display profile is three, and an intersection point in three intersection points is the orthogonal points of concentric circles and display profile, and
The distance between other two intersection point in three intersection points is less than default error precision;The number of intersections of concentric circles and display profile
It is four, four intersection points are adjusted the distance for two is less than the intersection point of default error precision.
Optionally, the first display module includes: the second display unit, for from stroke display profile intermediate point, with
Preset shape is amplified according to default amplification speed, the profile of stroke is filled, with Dynamically Announce stroke.
Optionally, the second determining module includes: the 7th determination unit, for carrying out prototype compression to display profile, is determined
Show the person's handwriting line of profile;8th determination unit determines stroke display mode according to person's handwriting line.
Embodiment 10
According to another aspect of an embodiment of the present invention, a kind of storage medium is additionally provided, storage medium includes the journey of storage
Sequence, wherein equipment where control storage medium executes any one of above-mentioned font display methods in program operation, wraps
It includes:
Obtain the character font data for needing text to be shown;The display profile of the stroke of text is determined according to character font data;Root
The stroke display mode of stroke is determined according to display profile;According to stroke display mode Dynamically Announce stroke;According to the stroke of text
Sequentially, the stroke of Dynamically Announce text one by one, until the stroke of text is all shown.
Optionally, the display profile that the stroke of text is determined according to character font data includes: according to character font data, by being used for
It determines the system class of display profile, determines the path point list of display profile;The stroke of closed loop is generated according to path point list
Show profile.
Optionally, according to display profile determine stroke stroke display mode include: according to the data in the point list of path,
Determine the starting point and terminating point that stroke shows paths;According to starting point and terminating point by path point list, it is divided into the first son column
Table and the second sublist;The first subpath is determined according to the first sublist, and the second subpath is determined according to the second sublist;According to
First subpath and the second subpath determine that stroke shows paths;Wherein, preset shape shows paths mobile aobvious according to stroke
Show that mode is stroke display mode.
Optionally, according to the data in the point list of path, determine that the terminating point that stroke shows paths includes: by path point range
The starting point of display profile in table, the terminating point to show paths as stroke;Wherein, display profile is complete closed loop profile,
Starting point is the halt for showing profile.
Optionally, according to the data in the point list of path, determine that the starting point that stroke shows paths includes: to acquisite approachs point
In list, the first datum mark of X-coordinate axle minimum value and the second datum mark of Y axis coordinate minimum value;According to the first datum mark and
Second datum mark determines starting point.
Optionally, determine that starting point includes: in the first datum mark and the second base according to the first datum mark and the second datum mark
In the case where being same point on schedule, the first datum mark or the second datum mark are starting point;In the first datum mark and the second datum mark
It in the case where not for same point, determines in the point list of path, the point farthest apart from terminating point, is starting point.
Optionally, according to the data in the point list of path, determine that the starting point that stroke shows paths includes: to acquisite approachs point
The starting point and halt of display profile in list;On the display profile of starting point to halt, display profile is determined
Midpoint;The starting point that midpoint is showed paths as stroke.
Optionally, determining that stroke shows paths according to the first subpath and the second subpath includes: by the second subpath
Path point in second sublist is inverted sequence, determines third subpath;According to multiple first path points in the first subpath,
Determine a first path point apart from the smallest second path point respectively from third subpath;According to first path point and corresponding
Second path point determines stroke path point;Determine that stroke shows paths according to stroke path point.
Optionally, determine that stroke path point includes: by first path according to first path point and corresponding second path point
Midpoint between point and corresponding second path point is as stroke path point.
It optionally, include: by preset base shape according to preset shifting according to the stroke Dynamically Announce stroke that shows paths
Dynamic speed, shows paths according to stroke and fills the display profile of stroke, with Dynamically Announce stroke.
Optionally, determine that the stroke display mode of stroke includes: to pass through to preset greatly according to display profile according to display profile
Small coordinate table determines the intermediate point of stroke;Determine that amplify the display mode of preset shape on the basis of intermediate point shows for stroke
Show mode.
Optionally, determine that the intermediate point of stroke includes: in coordinate by presetting the coordinate table of size according to display profile
In table, display profile is obtained;According to certain density, multiple pre- reconnaissances are determined in display profile;It is true according to multiple pre- reconnaissances
Determine intermediate point.
Optionally, determine that intermediate point includes: according to multiple pre- reconnaissances, according to two neighboring concentric circles according to multiple pre- reconnaissances
Preset diameters it is poor, each pre- reconnaissance is generated using pre- reconnaissance as multiple concentric circles in the center of circle;From the multiple concentric of multiple pre- reconnaissances
Middle circle is determined in circle;The corresponding pre- reconnaissance of middle circle is intermediate point.
Optionally, determine that middle circle includes: according to concentric circles and display profile from multiple concentric circles of multiple pre- reconnaissances
Number of intersections and distance, determine middle circle;Wherein, by judge concentric circles and show profile number of intersections and distance whether
Meet following condition, determines middle circle;In the case where concentric circles meets at least one following condition, determine concentric circles for centre
Circle;The number of intersections of concentric circles and display profile is two, and two intersection points are concentric circles and the orthogonal points for showing profile;Concentric circles
Number of intersections with display profile is three, and an intersection point in three intersection points is the orthogonal points of concentric circles and display profile, and
The distance between other two intersection point in three intersection points is less than default error precision;The number of intersections of concentric circles and display profile
It is four, four intersection points are adjusted the distance for two is less than the intersection point of default error precision.
It optionally, include: from the centre of the display profile of stroke according to the stroke of stroke display mode Dynamically Announce text
Point is amplified according to default amplification speed with preset shape, the profile of stroke is filled, with Dynamically Announce stroke.
Optionally, determine that the stroke display mode of stroke includes: to carry out prototype compression to display profile according to display profile,
Determine the person's handwriting line of display profile;Stroke display mode is determined according to person's handwriting line.
Embodiment 11
According to another aspect of an embodiment of the present invention, a kind of processor is additionally provided, processor is used to run program,
In, program executes any one of above-mentioned font display methods when running, comprising:
Obtain the character font data for needing text to be shown;The display profile of the stroke of text is determined according to character font data;Root
The stroke display mode of stroke is determined according to display profile;According to stroke display mode Dynamically Announce stroke;According to the stroke of text
Sequentially, the stroke of Dynamically Announce text one by one, until the stroke of text is all shown.
Optionally, the display profile that the stroke of text is determined according to character font data includes: according to character font data, by being used for
It determines the system class of display profile, determines the path point list of display profile;The stroke of closed loop is generated according to path point list
Show profile.
Optionally, according to display profile determine stroke stroke display mode include: according to the data in the point list of path,
Determine the starting point and terminating point that stroke shows paths;According to starting point and terminating point by path point list, it is divided into the first son column
Table and the second sublist;The first subpath is determined according to the first sublist, and the second subpath is determined according to the second sublist;According to
First subpath and the second subpath determine that stroke shows paths;Wherein, preset shape shows paths mobile aobvious according to stroke
Show that mode is stroke display mode.
Optionally, according to the data in the path point list, determine terminating point that the stroke shows paths include: by
The starting point of the display profile in the path point list, the terminating point to show paths as the stroke;Wherein, described
Display profile is complete closed loop profile, and the starting point is the halt of the display profile.
Optionally, according to the data in the point list of path, determine that the starting point that stroke shows paths includes: to acquisite approachs point
In list, the first datum mark of X-coordinate axle minimum value and the second datum mark of Y axis coordinate minimum value;According to the first datum mark and
Second datum mark determines starting point.
Optionally, determine that starting point includes: in the first datum mark and the second base according to the first datum mark and the second datum mark
In the case where being same point on schedule, the first datum mark or the second datum mark are starting point;In the first datum mark and the second datum mark
It in the case where not for same point, determines in the path point list, the point farthest apart from the terminating point, is the starting point.
Optionally, according to the data in the path point list, determine that the starting point that the stroke shows paths includes: to obtain
Take the display profile in the path point list the starting point and the halt;In the starting point to halt
Display profile on, determine it is described display profile midpoint;The starting point that the midpoint is showed paths as the stroke.
Optionally, determining that stroke shows paths according to the first subpath and the second subpath includes: by the second subpath
Path point in second sublist is inverted sequence, determines third subpath;According to multiple first path points in the first subpath,
Determine a first path point apart from the smallest second path point respectively from third subpath;According to first path point and corresponding
Second path point determines stroke path point;Determine that stroke shows paths according to stroke path point.
Optionally, determine that stroke path point includes: by first path according to first path point and corresponding second path point
Midpoint between point and corresponding second path point is as stroke path point.
It optionally, include: by preset base shape according to preset shifting according to the stroke Dynamically Announce stroke that shows paths
Dynamic speed, shows paths according to stroke and fills the display profile of stroke, with Dynamically Announce stroke.
Optionally, determine that the stroke display mode of stroke includes: to pass through to preset greatly according to display profile according to display profile
Small coordinate table determines the intermediate point of stroke;Determine that amplify the display mode of preset shape on the basis of intermediate point shows for stroke
Show mode.
Optionally, determine that the intermediate point of stroke includes: in coordinate by presetting the coordinate table of size according to display profile
In table, display profile is obtained;According to certain density, multiple pre- reconnaissances are determined in display profile;It is true according to multiple pre- reconnaissances
Determine intermediate point.
Optionally, determine that intermediate point includes: according to multiple pre- reconnaissances, according to two neighboring concentric circles according to multiple pre- reconnaissances
Preset diameters it is poor, each pre- reconnaissance is generated using pre- reconnaissance as multiple concentric circles in the center of circle;From the multiple concentric of multiple pre- reconnaissances
Middle circle is determined in circle;The corresponding pre- reconnaissance of middle circle is intermediate point.
Optionally, determine that middle circle includes: according to concentric circles and display profile from multiple concentric circles of multiple pre- reconnaissances
Number of intersections and distance, determine middle circle;Wherein, by judge concentric circles and show profile number of intersections and distance whether
Meet following condition, determines middle circle;In the case where concentric circles meets at least one following condition, determine concentric circles for centre
Circle;The number of intersections of concentric circles and display profile is two, and two intersection points are concentric circles and the orthogonal points for showing profile;Concentric circles
Number of intersections with display profile is three, and an intersection point in three intersection points is the orthogonal points of concentric circles and display profile, and
The distance between other two intersection point in three intersection points is less than default error precision;The number of intersections of concentric circles and display profile
It is four, four intersection points are adjusted the distance for two is less than the intersection point of default error precision.
It optionally, include: from the centre of the display profile of stroke according to the stroke of stroke display mode Dynamically Announce text
Point is amplified according to default amplification speed with preset shape, the profile of stroke is filled, with Dynamically Announce stroke.
Optionally, determine that the stroke display mode of stroke includes: to carry out prototype compression to display profile according to display profile,
Determine the person's handwriting line of display profile;Stroke display mode is determined according to person's handwriting line.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
In the above embodiment of the invention, it all emphasizes particularly on different fields to the description of each embodiment, does not have in some embodiment
The part of detailed description, reference can be made to the related descriptions of other embodiments.
In several embodiments provided herein, it should be understood that disclosed technology contents can pass through others
Mode is realized.Wherein, the apparatus embodiments described above are merely exemplary, such as the division of the unit, Ke Yiwei
A kind of logical function partition, there may be another division manner in actual implementation, for example, multiple units or components can combine or
Person is desirably integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual
Between coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING or communication link of unit or module
It connects, can be electrical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
On unit.It can some or all of the units may be selected to achieve the purpose of the solution of this embodiment according to the actual needs.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product
When, it can store in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially
The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words
It embodies, which is stored in a storage medium, including some instructions are used so that a computer
Equipment (can for personal computer, server or network equipment etc.) execute each embodiment the method for the present invention whole or
Part steps.And storage medium above-mentioned includes: that USB flash disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited
Reservoir (RAM, Random Access Memory), mobile hard disk, magnetic or disk etc. be various to can store program code
Medium.
The above is only a preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art
For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered
It is considered as protection scope of the present invention.
Claims (19)
1. a kind of character displaying method characterized by comprising
Obtain the character font data for needing text to be shown;
The display profile of the stroke of the text is determined according to the character font data;
The stroke display mode of the stroke is determined according to the display profile;
According to stroke described in the stroke display mode Dynamically Announce;
According to the stroke order of the text, the stroke of text described in Dynamically Announce one by one, until the stroke of the text is complete
Portion is shown.
2. the method according to claim 1, wherein determining the stroke of the text according to the character font data
Show that profile includes:
According to the character font data, by determining the path of the display profile for determining the system class of the display profile
Point list;
The display profile of the stroke of closed loop is generated according to the path point list.
3. according to the method described in claim 2, it is characterized in that, determining that the stroke of the stroke is aobvious according to the display profile
The mode of showing includes:
According to the data in the path point list, the starting point and terminating point that stroke shows paths are determined;
According to the starting point and the terminating point by the path point list, it is divided into the first sublist and the second sublist;
The first subpath is determined according to first sublist, and the second subpath is determined according to second sublist;
Determine that the stroke shows paths according to first subpath and second subpath;Wherein, preset shape according to
The stroke shows paths mobile display mode as the stroke display mode.
4. according to the method described in claim 3, it is characterized in that, according to the data in the path point list, described in determination
The terminating point that stroke shows paths includes:
By the starting point of the display profile in the path point list, the terminating point to show paths as the stroke;
Wherein, the display profile is complete closed loop profile, and the starting point is the halt of the display profile.
5. according to the method described in claim 4, it is characterized in that, according to the data in the path point list, described in determination
The starting point that stroke shows paths includes:
It obtains in the path point list, the first datum mark of X-coordinate axle minimum value and the second benchmark of Y axis coordinate minimum value
Point;
The starting point is determined according to first datum mark and second datum mark.
6. according to the method described in claim 5, it is characterized in that, true according to first datum mark and second datum mark
Determining the starting point includes:
In the case where first datum mark and second datum mark are same point, first datum mark or described second
Datum mark is the starting point;
In the case where first datum mark and second datum mark are not same point, determine in the path point list,
The point farthest apart from the terminating point is the starting point.
7. according to the method described in claim 4, it is characterized in that, according to the data in the path point list, described in determination
The starting point that stroke shows paths includes:
Obtain the display profile in the path point list the starting point and the halt;
On the display profile of the starting point to halt, the midpoint of the display profile is determined;
The starting point that the midpoint is showed paths as the stroke.
8. according to the method described in claim 3, it is characterized in that, true according to first subpath and second subpath
The fixed stroke, which shows paths, includes:
Path point in second sublist of second subpath is inverted sequence, determines third subpath;
According to multiple first path points in first subpath, a described first is determined respectively from the third subpath
Path point is apart from the smallest second path point;
Stroke path point is determined according to the first path point and corresponding second path point;
Determine that the stroke shows paths according to the stroke path point.
9. according to the method described in claim 8, it is characterized in that, according to the first path point and corresponding second tunnel
Diameter point determines that stroke path point includes:
Using the midpoint between the first path point and corresponding second path point as the stroke path point.
10. according to the method described in claim 8, it is characterized in that, being showed paths pen described in Dynamically Announce according to the stroke
Picture includes:
By preset base shape according to preset movement speed, is showed paths according to the stroke and fill the display of the stroke
Profile, with stroke described in Dynamically Announce.
11. the method according to claim 1, wherein determining the stroke of the stroke according to the display profile
Display mode includes:
The intermediate point of the stroke is determined by presetting the coordinate table of size according to the display profile;
Determine that the display mode for amplifying preset shape on the basis of the intermediate point is the stroke display mode.
12. according to the method for claim 11, which is characterized in that pass through the coordinate of default size according to the display profile
Table determines that the intermediate point of the stroke includes:
In the coordinate table, the display profile is obtained;
According to certain density, multiple pre- reconnaissances are determined in the display profile;
The intermediate point is determined according to multiple pre- reconnaissances.
13. according to the method for claim 12, which is characterized in that determine the intermediate point packet according to multiple pre- reconnaissances
It includes:
According to multiple pre- reconnaissances, the preset diameters according to two neighboring concentric circles are poor, and each pre- reconnaissance is generated with institute
State multiple concentric circles that pre- reconnaissance is the center of circle;
Middle circle is determined from multiple concentric circles of multiple pre- reconnaissances;
The corresponding pre- reconnaissance of the middle circle is the intermediate point.
14. according to the method for claim 13, which is characterized in that from multiple concentric circles of multiple pre- reconnaissances
Determine that middle circle includes:
According to the number of intersections and distance of the concentric circles and the display profile, the middle circle is determined;
Wherein, whether following condition is met by the number of intersections and distance that judge the concentric circles and the display profile, really
The fixed middle circle;In the case where concentric circles meets at least one following condition, determine that the concentric circles is the middle circle;
The number of intersections of the concentric circles and the display profile is two, and two intersection points are that the concentric circles and the display are taken turns
Wide orthogonal points;
The number of intersections of the concentric circles and the display profile is three, and an intersection point in three intersection points is the concentric circles
With the orthogonal points of the display profile, and the distance between other two intersection point in three intersection points is less than default error precision;
The number of intersections of the concentric circles and the display profile is four, and four intersection points are adjusted the distance for two is less than default error essence
The intersection point of degree.
15. according to the method for claim 14, which is characterized in that according to text described in the stroke display mode Dynamically Announce
The stroke of word includes:
From the intermediate point of the display profile of the stroke, amplified with preset shape according to default amplification speed, described in filling
The profile of stroke, with stroke described in Dynamically Announce.
16. the method according to claim 1, wherein determining the stroke of the stroke according to the display profile
Display mode includes:
Prototype compression is carried out to the display profile, determines the person's handwriting line of the display profile;
The stroke display mode is determined according to the person's handwriting line.
17. a kind of character display apparatus characterized by comprising
Module is obtained, for obtaining the character font data for needing text to be shown;
First determining module, the display profile of the stroke for determining the text according to the character font data;
Second determining module, for determining the stroke display mode of the stroke according to the display profile;
First display module is used for the stroke according to the stroke display mode Dynamically Announce;
Second display module, for the stroke order according to the text, the stroke of text described in Dynamically Announce one by one, until
The stroke of the text is all shown.
18. a kind of storage medium, which is characterized in that the storage medium includes the program of storage, wherein run in described program
When control the storage medium where equipment perform claim require any one of 1 to 16 described in method.
19. a kind of processor, which is characterized in that the processor is for running program, wherein right of execution when described program is run
Benefit require any one of 1 to 16 described in method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910563653.3A CN110322538B (en) | 2019-06-26 | 2019-06-26 | Text display method, text display device, storage medium and processor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910563653.3A CN110322538B (en) | 2019-06-26 | 2019-06-26 | Text display method, text display device, storage medium and processor |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110322538A true CN110322538A (en) | 2019-10-11 |
CN110322538B CN110322538B (en) | 2023-09-05 |
Family
ID=68120336
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910563653.3A Active CN110322538B (en) | 2019-06-26 | 2019-06-26 | Text display method, text display device, storage medium and processor |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110322538B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110794849A (en) * | 2019-11-28 | 2020-02-14 | 广州视源电子科技股份有限公司 | Path processing method and device, robot, computer equipment and storage medium |
CN111324405A (en) * | 2020-01-20 | 2020-06-23 | 北京无限光场科技有限公司 | Character display method and device and electronic equipment |
CN113763514A (en) * | 2021-07-15 | 2021-12-07 | 北京字节跳动网络技术有限公司 | Method, device and system for generating stroke order animation and electronic equipment |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1588350A (en) * | 2004-09-17 | 2005-03-02 | 华南理工大学 | Treating method and its use for dynamic Chinese character word library containing writing time sequence information |
CN101630311A (en) * | 2008-07-18 | 2010-01-20 | 常州华文印刷新技术有限公司 | Method and device for displaying characters |
JP2011003040A (en) * | 2009-06-19 | 2011-01-06 | Kinichi Inagaki | General-purpose two-dimensional shape or three-dimensional shape automatic designing and manufacturing system for processing two-dimensional shape or three-dimensional shape for processing graphic and shape, including uncertain graphic sentence program |
CN106384094A (en) * | 2016-09-18 | 2017-02-08 | 北京大学 | Chinese word stock automatic generation method based on writing style modeling |
CN106981086A (en) * | 2016-01-18 | 2017-07-25 | 北大方正集团有限公司 | Information broadcasting method and information play apparatus |
CN107665186A (en) * | 2017-09-29 | 2018-02-06 | 深圳市前海手绘科技文化有限公司 | A kind of peculiar font generation method |
-
2019
- 2019-06-26 CN CN201910563653.3A patent/CN110322538B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1588350A (en) * | 2004-09-17 | 2005-03-02 | 华南理工大学 | Treating method and its use for dynamic Chinese character word library containing writing time sequence information |
CN101630311A (en) * | 2008-07-18 | 2010-01-20 | 常州华文印刷新技术有限公司 | Method and device for displaying characters |
JP2011003040A (en) * | 2009-06-19 | 2011-01-06 | Kinichi Inagaki | General-purpose two-dimensional shape or three-dimensional shape automatic designing and manufacturing system for processing two-dimensional shape or three-dimensional shape for processing graphic and shape, including uncertain graphic sentence program |
CN106981086A (en) * | 2016-01-18 | 2017-07-25 | 北大方正集团有限公司 | Information broadcasting method and information play apparatus |
CN106384094A (en) * | 2016-09-18 | 2017-02-08 | 北京大学 | Chinese word stock automatic generation method based on writing style modeling |
CN107665186A (en) * | 2017-09-29 | 2018-02-06 | 深圳市前海手绘科技文化有限公司 | A kind of peculiar font generation method |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110794849A (en) * | 2019-11-28 | 2020-02-14 | 广州视源电子科技股份有限公司 | Path processing method and device, robot, computer equipment and storage medium |
CN111324405A (en) * | 2020-01-20 | 2020-06-23 | 北京无限光场科技有限公司 | Character display method and device and electronic equipment |
CN113763514A (en) * | 2021-07-15 | 2021-12-07 | 北京字节跳动网络技术有限公司 | Method, device and system for generating stroke order animation and electronic equipment |
CN113763514B (en) * | 2021-07-15 | 2024-04-02 | 北京字节跳动网络技术有限公司 | Method, device and system for generating stroke order animation and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN110322538B (en) | 2023-09-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
LaViola Jr et al. | 3D user interfaces: theory and practice | |
US20160110052A1 (en) | Apparatus and method of drawing and solving figure content | |
CN110322538A (en) | Character displaying method, device, storage medium and processor | |
CN105493023A (en) | Manipulation of content on a surface | |
CN106200960A (en) | The content display method of electronic interactive product and device | |
CN108389249A (en) | A kind of spaces the VR/AR classroom of multiple compatibility and its construction method | |
KR101891101B1 (en) | Electronic apparatus and method for controlling playback speed of an animation message | |
WO2014149794A1 (en) | Guided exploration of an exhibition environment | |
CN106774821B (en) | Display method and system based on virtual reality technology | |
US20220326967A1 (en) | Devices, methods, systems, and media for an extended screen distributed user interface in augmented reality | |
CN112835504B (en) | Thinking guide graph track processing method, thinking guide graph track processing device, computer equipment and storage medium | |
CN112270641A (en) | Geometric figure display method and device | |
TWI702504B (en) | System for splicing and converting images of chinese character into vocabularies and mobile terminal | |
US20230290132A1 (en) | Object recognition neural network training using multiple data sources | |
CN111739134B (en) | Model processing method and device for virtual character and readable storage medium | |
Lin et al. | Virtual geographic environments | |
JP6273978B2 (en) | Display control program, display control apparatus, and display control method | |
JP6458889B2 (en) | Display control program and display control apparatus | |
US11670018B2 (en) | Method for replaying vector image | |
CN106648574A (en) | Middle school solid geometry intelligent teaching system applied to electronic double boards | |
CN107705343A (en) | Pattern drawing method and device during online question-answering | |
CN107335218A (en) | Scene of game moving method and device, storage medium, processor and terminal | |
EP4325344A1 (en) | Multi-terminal collaborative display update method and apparatus | |
KR20200069114A (en) | System and Device for learning creator's style | |
WO2018045685A1 (en) | Picture display method and device |
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 |