Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit87ae845

Browse files
committed
adds a few more bits of info for StandardGlyphVector
1 parent3e34da0 commit87ae845

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20250224211151
1+
20250228085852

‎sources/net.sf.j2s.java.core/src/sun/font/StandardGlyphVector.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,11 @@ private static class JSTextMetrics {
144144
floatactualBoundingBoxAscent;
145145
floatactualBoundingBoxRight;
146146
floatactualBoundingBoxDescent;
147+
floatfontBoundingBoxAscent;
148+
floatfontBoundingBoxDescent;
149+
floatoffsetX,offsetY;
147150
privateStringtext;
151+
privatefloatlogicalWidth;
148152

149153

150154
publicJSTextMetrics(Stringtext,JSTextMetricstm) {
@@ -154,6 +158,11 @@ public JSTextMetrics(String text, JSTextMetrics tm) {
154158
this.actualBoundingBoxDescent =tm.actualBoundingBoxDescent;
155159
this.actualBoundingBoxLeft =tm.actualBoundingBoxLeft;
156160
this.actualBoundingBoxRight =tm.actualBoundingBoxRight;
161+
this.fontBoundingBoxAscent =tm.fontBoundingBoxAscent;
162+
this.fontBoundingBoxDescent =tm.fontBoundingBoxDescent;
163+
this.logicalWidth =actualBoundingBoxRight -actualBoundingBoxLeft;
164+
this.offsetX = -actualBoundingBoxLeft;
165+
this.offsetY =actualBoundingBoxAscent +fontBoundingBoxDescent;
157166
//System. intln("jstxtm"
158167
//+ " " + this.actualBoundingBoxLeft
159168
//+ " " + this.actualBoundingBoxRight
@@ -169,8 +178,9 @@ protected Rectangle2D.Float getActualBounds(float x0, float y0) {
169178
}
170179

171180
protectedfloatgetLogicalWidth() {
172-
returnactualBoundingBoxRight -actualBoundingBoxLeft;
181+
returnlogicalWidth;
173182
}
183+
174184
}
175185

176186

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp