-
Notifications
You must be signed in to change notification settings - Fork 147
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
Select font_face by font name string #1773
Comments
this is an incredibly reasonable proposition! can be the same function and check arg type. |
ah, just sunk in that it'd be called a lot in the redraw. there's likely an optimized approach, let's think on it. |
I don't love this idea, but there's potentially a |
i'm wondering if passing the string to the C layer is faster than just
having a lookup table within lua
…On Wed, Mar 20, 2024 at 11:53 AM Dan Sim ***@***.***> wrote:
I don't love this idea, but there's potentially a get_font_index(str)
angle here to do the lookup manually.
—
Reply to this email directly, view it on GitHub
<#1773 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAB4I4GCCTOVJD6RARYMQWLYZGWHPAVCNFSM6AAAAABE7QIIEWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBZHEYTAMRVGQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
That might be enough? Thinking about this for a couple of days, of all the logic I've shoved into the redraw loop, these checks would not be the biggest offender by a long shot. edit: How might we measure the impact of a particular approach? |
This is something I'm interested in implementing, opening an issue here to discuss feasibility and potential pitfalls.
Assuming this is a desirable feature, would it be preferable to add a check if the input to
screen.font_face(i)
is number or a string, or would it be best a separate function. Separate function seems noisier but I'm wondering if doing a string check inside redraw loop is wasted cycles.The text was updated successfully, but these errors were encountered: