You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Code behaves as expected with "alphabetic" or "ideographic".
Issue:
Code behaves as expected with "top", "bottom", "hanging" and "middle" only if you keep the default lineHeightFactor.
Changing the global lineHeightFactor or the lineHeightFactor from the doc.text(...) function will produce an unexpected output.
doc.setLineHeightFactor(2); // this
// or this
doc.text('Test 1', 72, 72, { baseline: 'hanging', lineHeightFactor: 2 });
Expected output:
Text should hang by the 72pt line.
Unexpected output:
Text does not do what the baseline claims to do. If we continue with the "hanging" baseline for example, it breaks if the scale factor is anything but 1.15.
For now, the work around is to calculate the baseline manually. The issue is that in the source code the descent is dependent on the lineHeightFactor when in reality it should probably be a fixed percentage.
Thank you.
The text was updated successfully, but these errors were encountered:
Happy new year :)
Anyways uh just wanted to point something out.
Starting on line: 3627
Code behaves as expected with "alphabetic" or "ideographic".
Issue:
Code behaves as expected with "top", "bottom", "hanging" and "middle" only if you keep the default lineHeightFactor.
Changing the global lineHeightFactor or the lineHeightFactor from the doc.text(...) function will produce an unexpected output.
Expected output:
Text should hang by the 72pt line.
Unexpected output:
Text does not do what the baseline claims to do. If we continue with the "hanging" baseline for example, it breaks if the scale factor is anything but 1.15.
For now, the work around is to calculate the baseline manually. The issue is that in the source code the descent is dependent on the lineHeightFactor when in reality it should probably be a fixed percentage.
Thank you.
The text was updated successfully, but these errors were encountered: