-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
Emoji rendering in DWrite shaper & DWrite font locator #360
Emoji rendering in DWrite shaper & DWrite font locator #360
Conversation
tmp.size() | ||
); | ||
|
||
for (auto i = 0; i < height; i++) |
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.
Would you want to give range::views::iota(0, N)
a try? An example use would be here:
Lines 557 to 558 in abdae01
for (auto const i: ranges::views::iota(0u, n.as<size_t>())) | |
resetLine(baseLineOffset + LineOffset::cast_from(i), _defaultAttributes); |
It avoids the need of having the iterator variable being noon-const (mutable) even though it is only used read-only in the loop body.
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.
I am too dumb to actually make it work 😅 .
The compiler hates me. I'll give it a try in future PRs.
49bf632
to
372350c
Compare
ComPtr<IDWriteTextFormat1> format1; | ||
|
||
if (SUCCEEDED(hr) && SUCCEEDED(format->QueryInterface(IID_PPV_ARGS(&format1)))) | ||
font_source_list sources = d->locator_->resolve(gsl::span(_text.data(), _text.size())); |
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.
Note that only DWrite locator implements resolve
. So basically you'll see zero font fallback for CJK if using DWrite shaper + Font config locator.
Also I think resolve here need to also pass fontDescription
for bold/italic/etc.
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.
I will catch up with them font config "resolve" implementation ASAP :)
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.
I was a little more strict in reviewing. Most of it I think you can just take as suggestions and/or thoughts. :)
25ca90a
to
9199f15
Compare
No description provided.