Applying effects to a merged text path
AssigneeMicrosoft Corporation
InventorsLutz Gerhard, Michael J. Arvold, Michael Kallay
Life of this patent
Estimating the term…
Abstract
Effects are applied to a shape that is generated from a merged text path. The merged text path is created from text paths that are associated with a text run. Boolean operations may be used to create the merged text path. The merged text path removes any overlap and redundancy of the characters within the text run. The shape that is generated from the merged text path maintains the text path information that is associated with the text run such that additional effects may be applied to the shape.
Claims17
A computer-implemented method for applying effects, comprising:
- receiving a text run, the text run including two or more characters;
- creating a merged text path for the text run, the creation of the merged text path comprising:
- receiving geometry that is associated with the text run, the geometry including one or more curved shapes;
- approximating the one or more curved shapes into polygons;
- breaking the geometry into chains, at least one chain comprising a segment of a polygon, the segment of the polygon derived from the one or more curved shapes, the at least one chain including three or more vertices, the three or more vertices including a head vertex and a tail vertex, the head vertex being the first vertex in the chain and the tail vertex being the last vertex in the chain;
- computing junctions, a junction being established when a new chain is activated or when the tail vertex of an existing chain is processed, the junction having the coordinate location of the head vertex of the new chain or the tail vertex of the existing chain, the junction including one or more head vertices or tail vertices having the same coordinates as the junction;
- discarding redundant chains;
- connecting non-redundant pieces to form an outline;
- determining whether two adjacent characters in the text run overlap;
- and
- when it is determined that two adjacent characters in the text run overlap, removing the overlap between the two adjacent characters, the overlap being removed by removing one or more redundant pieces of the overlapping, merged characters within the text run;
- generating a single shape from the merged text path;
- and
- applying an effect to the single shape.
A computer-readable storage medium having computer-executable instructions for applying effects to a text run, the instructions comprising:
- receiving a text run to which a first effect is to be applied, the text run including two or more characters;
- creating a merged text path for the text run, the creation of the merged text path comprising:
- receiving geometry that is associated with the text run, the geometry including one or more curved shapes;
- approximating the one or more curved shapes into polygons;
- breaking the geometry into chains, at least one chain comprising a segment of a polygon, the segment of the polygon derived from the one or more curved shapes, the at least one chain including three or more vertices, the three or more vertices including a head vertex and a tail vertex, the head vertex being the first vertex in the chain and the tail vertex being the last vertex in the chain;
- computing junctions, a junction being established when a new chain is activated or when the tail vertex of an existing chain is processed, the junction having the coordinate location of the head vertex of the new chain or the tail vertex of the existing chain, the junction including one or more head vertices or tail vertices having the same coordinates as the junction;
- discarding redundant chains;
- connecting non-redundant pieces to form an outline;
- determining whether two adjacent characters in the text run overlap;
- and
- when it is determined that two adjacent characters in the text run overlap, removing the overlap between the two adjacent characters, the overlap being removed by removing one or more redundant pieces of the overlapping, merged characters within the text run;
- generating a single shape from the merged text path;
- and
- applying the first effect to the single shape.
A computing apparatus for applying effects to a text run, comprising:
- a processor and a computer-readable storage medium;
- an operating environment stored on the computer-readable storage medium and executing on the processor;
- a display;
- an application operating under the control of the operating environment and operative to generate a text run to which an effect is to be applied;
- and
- an effects engine that is configured to:
- receive the text run, the text run including two or more characters;
- create a merged text path for the text run by further configuring the effects engine to:
- receive geometry that is associated with the text run, the geometry including one or more curved shapes;
- approximate the one or more curved shapes into polygons;
- break the geometry into chains, at least one chain comprising a segment of a polygon, the segment of the polygon derived from the one or more curved shapes, the at least one chain including three or more vertices, the three or more vertices including a head vertex and a tail vertex, the head vertex being the first vertex in the chain and the tail vertex being the last vertex in the chain;
- compute junctions, a junction being established when a new chain is activated or when the tail vertex of an existing chain is processed, the junction having the coordinate location of the head vertex of the new chain or the tail vertex of the existing chain, the junction including one or more head vertices or tail vertices having the same coordinates as the junction;
- discard redundant chains;
- connect non-redundant pieces to form an outline;
- determine whether two adjacent characters in the text run overlap;
- and
- when it is determined that two adjacent characters in the text run overlap, remove any overlap between the two adjacent characters, the overlap being removed by removing one or more redundant pieces of the overlapping, merged characters within the text run;
- generate a single shape from the merged text path;
- apply the effect to the single shape;
- and
- display the single shape on the display.
Dependencies are inferred from the claim text.