font/coretext: glyphIndex must return u32 for noop shaper

This commit is contained in:
Mitchell Hashimoto
2024-05-28 21:05:32 -07:00
parent f6e708c0fb
commit d978d05d7e

View File

@ -238,7 +238,7 @@ pub const Face = struct {
/// Returns the glyph index for the given Unicode code point. If this
/// face doesn't support this glyph, null is returned.
pub fn glyphIndex(self: Face, cp: u32) ?u16 {
pub fn glyphIndex(self: Face, cp: u32) ?u32 {
// Turn UTF-32 into UTF-16 for CT API
var unichars: [2]u16 = undefined;
const pair = macos.foundation.stringGetSurrogatePairForLongCharacter(cp, &unichars);