Skip to content

wip: xboxへの対応#80

Open
ienaga wants to merge 37 commits into
mainfrom
develop
Open

wip: xboxへの対応#80
ienaga wants to merge 37 commits into
mainfrom
develop

Conversation

@ienaga

@ienaga ienaga commented Jul 13, 2026

Copy link
Copy Markdown
Member

No description provided.

Comment on lines +303 to +304
pen_x += stbtt_GetCodepointKernAdvance(
&lo.font->info, cp, static_cast<int>(lo.cps[i + 1])) * lo.scale;
}
}

pen_x += advance * lo.scale;
&lo.font->info, glyph.data(), gw, gh, gw,
lo.scale, lo.scale, shift_x, 0, cp);

const int dst_x = static_cast<int>(std::floor(pen_x + lsb * lo.scale));

int x0 = 0, y0 = 0, x1 = 0, y1 = 0;
const float shift_x =
static_cast<float>(pen_x + lsb * lo.scale - std::floor(pen_x + lsb * lo.scale));

int x0 = 0, y0 = 0, x1 = 0, y1 = 0;
const float shift_x =
static_cast<float>(pen_x + lsb * lo.scale - std::floor(pen_x + lsb * lo.scale));
return false;
}

const double ascent_px = lo.ascent * lo.scale;
}
out.width = lo.width;
out.ascent = lo.ascent * lo.scale;
out.descent = -lo.descent * lo.scale; // stbtt の descent は負値
return false;
}
out.width = lo.width;
out.ascent = lo.ascent * lo.scale;
Comment on lines +201 to +204
x += stbtt_GetCodepointKernAdvance(
&lo.font->info,
static_cast<int>(lo.cps[i]),
static_cast<int>(lo.cps[i + 1])) * lo.scale;
for (size_t i = 0; i < lo.cps.size(); ++i) {
int advance = 0, lsb = 0;
stbtt_GetCodepointHMetrics(&lo.font->info, static_cast<int>(lo.cps[i]), &advance, &lsb);
x += advance * lo.scale;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants