Skip to content

Commit

Permalink
apprt/embedded: use new copyAttribute API for CoreText
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellh committed Aug 25, 2024
1 parent def4abf commit 7747eaf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/apprt/embedded.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1981,7 +1981,8 @@ pub const CAPI = struct {
// at 1x but callers of this should be using scaled or apply
// scale themselves.
const size: f32 = size: {
const num = face.font.copyAttribute(.size);
const num = face.font.copyAttribute(.size) orelse
break :size 12;
defer num.release();
var v: f32 = 12;
_ = num.getValue(.float, &v);
Expand Down

0 comments on commit 7747eaf

Please sign in to comment.