Don't scale text outlines (#685)

This commit is contained in:
DD Liu 2018-09-18 16:30:56 -04:00 committed by GitHub
parent a5baa14316
commit c8a5db311b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -120,6 +120,10 @@ const ensureClockwise = function (root) {
// Scale item and its strokes by factor
const scaleWithStrokes = function (root, factor, pivot) {
_doRecursively(root, item => {
if (item instanceof paper.PointText) {
// Text outline size is controlled by text transform matrix, thus it's already scaled.
return;
}
if (item.strokeWidth) {
item.strokeWidth = item.strokeWidth * factor;
}