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
// The portion of the run to calculate the typographic bounds for. By setting this to 0,
93
+
// CoreText will measure the bounds from start to end, see https://developer.apple.com/documentation/coretext/1510569-ctrungettypographicbounds?language=objc.
94
+
let range = CFRange{
95
+
location:0,
96
+
length:0,
97
+
};
98
+
99
+
let width = CTRunGetTypographicBounds(
100
+
self.as_concrete_TypeRef(),
101
+
range,
102
+
&mut ascent,
103
+
&mut descent,
104
+
&mut leading,
105
+
);
106
+
TypographicBounds{
107
+
width,
108
+
ascent,
109
+
descent,
110
+
leading,
111
+
}
112
+
}
113
+
}
114
+
86
115
pubfnstring_indices(&self) -> Cow<[CFIndex]>{
87
116
unsafe{
88
117
// CTRunGetStringIndicesPtr can return null under some not understood circumstances.
@@ -107,21 +136,30 @@ impl CTRun {
107
136
#[test]
108
137
fncreate_runs(){
109
138
use core_foundation::attributed_string::CFMutableAttributedString;
0 commit comments