File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -1873,10 +1873,16 @@ public float textAscent() {
1873
1873
defaultFontOrDeath ("textAscent" );
1874
1874
}
1875
1875
1876
+ // This value is dreadfully inaccurate and inconsistent, and especially
1877
+ // so for the default font. Switching to use our built-in calculation since
1878
+ // our most common use case is likely textAlign(CENTER, CENTER) with the
1879
+ // default font, and it needs to work well there. [fry 230716]
1880
+ /*
1876
1881
Font font = (Font) textFont.getNative();
1877
1882
if (font != null) {
1878
1883
return g2.getFontMetrics(font).getAscent();
1879
1884
}
1885
+ */
1880
1886
return super .textAscent ();
1881
1887
}
1882
1888
@@ -1886,10 +1892,12 @@ public float textDescent() {
1886
1892
if (textFont == null ) {
1887
1893
defaultFontOrDeath ("textDescent" );
1888
1894
}
1895
+ /*
1889
1896
Font font = (Font) textFont.getNative();
1890
1897
if (font != null) {
1891
1898
return g2.getFontMetrics(font).getDescent();
1892
1899
}
1900
+ */
1893
1901
return super .textDescent ();
1894
1902
}
1895
1903
Original file line number Diff line number Diff line change 1
1
1293 (4.2.1)
2
2
X `NullPointerException` when background exceeds color range when writing PDF
3
3
X https://github.com/processing/processing4/issues/740
4
+ X Use calculated text height instead of OS ascent for better vertical centering
5
+ X https://github.com/processing/processing4/issues/739
4
6
5
7
sampottinger
6
8
X Syntax error highlighting placement / width incorrect
You can’t perform that action at this time.
0 commit comments