New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix arm-none-eabi build (fixes #451) #496
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,7 +44,7 @@ | |
struct hb_ot_face_metrics_accelerator_t | ||
{ | ||
unsigned int num_metrics; | ||
unsigned int num_advances; | ||
uint32_t num_advances; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This would be safe I'd guess AFAIK but have a careful look please There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. needed as https://github.com/behdad/harfbuzz/blob/79e8e27ffd3da29ca27d3aebd2ef425bf1cb7f9d/src/hb-ot-font.cc#L141 glyph is uint32_t so this should be also (or I should cast there instead) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Meh. This case, cast would have been nice. But doesn't matter. Maybe change There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. np, went for cast |
||
unsigned int default_advance; | ||
unsigned short ascender; | ||
unsigned short descender; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -279,7 +279,7 @@ hb_ot_layout_get_ligature_carets (hb_font_t *font, | |
hb_codepoint_t glyph, | ||
unsigned int start_offset, | ||
unsigned int *caret_count /* IN/OUT */, | ||
int *caret_array /* OUT */) | ||
hb_position_t *caret_array /* OUT */) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now it matches with its actual signature on src/hb-ot-layout.h |
||
{ | ||
return _get_gdef (font->face).get_lig_carets (font, direction, glyph, start_offset, caret_count, caret_array); | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -139,28 +139,28 @@ joining_type (hb_codepoint_t u) | |
switch (u >> 12) | ||
{ | ||
case 0x0u: | ||
if (hb_in_range (u, 0x0600u, 0x08E2u)) return joining_table[u - 0x0600u + joining_offset_0x0600u]; | ||
if (hb_in_range<hb_codepoint_t> (u, 0x0600u, 0x08E2u)) return joining_table[u - 0x0600u + joining_offset_0x0600u]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If I change 0x0600u to 0x0600uL it works on arm-none-eabi but not on my default build system, so best way here would be disambiguating it I'd guess. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Another option would be to define a macro U:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was doing this but found out U already has a conflicting use. Not in favor of u() personally as it will obfuscating things more on my view, lets defer it if is possible. Template disambiguating had before use on the project so they are not that unusual I'd guess |
||
break; | ||
|
||
case 0x1u: | ||
if (hb_in_range (u, 0x1806u, 0x18AAu)) return joining_table[u - 0x1806u + joining_offset_0x1806u]; | ||
if (hb_in_range<hb_codepoint_t> (u, 0x1806u, 0x18AAu)) return joining_table[u - 0x1806u + joining_offset_0x1806u]; | ||
break; | ||
|
||
case 0x2u: | ||
if (hb_in_range (u, 0x200Cu, 0x2069u)) return joining_table[u - 0x200Cu + joining_offset_0x200cu]; | ||
if (hb_in_range<hb_codepoint_t> (u, 0x200Cu, 0x2069u)) return joining_table[u - 0x200Cu + joining_offset_0x200cu]; | ||
break; | ||
|
||
case 0xAu: | ||
if (hb_in_range (u, 0xA840u, 0xA873u)) return joining_table[u - 0xA840u + joining_offset_0xa840u]; | ||
if (hb_in_range<hb_codepoint_t> (u, 0xA840u, 0xA873u)) return joining_table[u - 0xA840u + joining_offset_0xa840u]; | ||
break; | ||
|
||
case 0x10u: | ||
if (hb_in_range (u, 0x10AC0u, 0x10AEFu)) return joining_table[u - 0x10AC0u + joining_offset_0x10ac0u]; | ||
if (hb_in_range (u, 0x10B80u, 0x10BAFu)) return joining_table[u - 0x10B80u + joining_offset_0x10b80u]; | ||
if (hb_in_range<hb_codepoint_t> (u, 0x10AC0u, 0x10AEFu)) return joining_table[u - 0x10AC0u + joining_offset_0x10ac0u]; | ||
if (hb_in_range<hb_codepoint_t> (u, 0x10B80u, 0x10BAFu)) return joining_table[u - 0x10B80u + joining_offset_0x10b80u]; | ||
break; | ||
|
||
case 0x1Eu: | ||
if (hb_in_range (u, 0x1E900u, 0x1E943u)) return joining_table[u - 0x1E900u + joining_offset_0x1e900u]; | ||
if (hb_in_range<hb_codepoint_t> (u, 0x1E900u, 0x1E943u)) return joining_table[u - 0x1E900u + joining_offset_0x1e900u]; | ||
break; | ||
|
||
default: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplication of parse_uint, no template please as it opens another can of worms on different platforms I'd think :)