Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upIntegrate gfx_glyph #132
Comments
This comment has been minimized.
This comment has been minimized.
|
It would be nice, yes! Glyph caching is on the to-do list anyway; I've been looking at gfx_glyph as a way of doing this but haven't really tried it out. |
icefoxen
added
enhancement
Type-CODE
labels
Aug 29, 2017
icefoxen
added this to the 0.4 milestone
Sep 8, 2017
This comment has been minimized.
This comment has been minimized.
|
Looks okay but there's a few rough edges. The main ones:
|
This comment has been minimized.
This comment has been minimized.
|
I have cross posted the second issue. I'm not sure about the solution of the other two, so I will leave it for further discussion. |
This comment has been minimized.
This comment has been minimized.
alexheretic
commented
Oct 5, 2017
|
@icefoxen regarding your first rough edge; gfx_glyph takes Let me know if you find more annoyances with gfx_glyph. |
icefoxen
modified the milestones:
0.4,
things I'm putting off
Oct 7, 2017
This comment has been minimized.
This comment has been minimized.
|
So I've been tinkering with this (not everything is on my public fork), and ran into
So far, I see these approaches on how to marry the two:
Both will require some sort of font handle to be stored within After naively implementing the first one (it lacks the drawing part, and screws up API by requiring |
This comment has been minimized.
This comment has been minimized.
|
@Ratysz Hey, thanks for the great summary! I'll play with the code you linked. One thing is sure, this will almost certainly need changes to the text drawing API to take full advantage of What I was originally thinking of is your first option, since I thought the glyph cache was only cleared upon demand. Turns out this is not true, it basically gets cleared whenever you change what text you're drawing. It actually looks like adding an option to only clear the cache explicitly would actually be really easy, if we ever need it. Digging around into its guts a little it looks like there's a few layers to this. It looks like So what it looks like is that we can do something like the first option and it will probably work okay; we basically use Of course, the real answer is "try things out and benchmark". That ought to be interesting! Also, having multiple Now pondering the second option... it would essentially come down to having a separate (Also, SO Assuming this all makes sense, how to move forward:
|
This comment has been minimized.
This comment has been minimized.
alexheretic
commented
Apr 26, 2018
Yeah that's about right but I never miss an opportunity to explain it with boring verbosity; there are 3 kinds of caching layout, texture and draw.
|
This was referenced Apr 26, 2018
This comment has been minimized.
This comment has been minimized.
|
I tinkered some more, this time putting a centralized Implemented a new
If/when alexheretic/glyph-brush#24 happens, it should be possible to omit the ungainly |
icefoxen
modified the milestones:
things I'm putting off,
0.5
May 2, 2018
This comment has been minimized.
This comment has been minimized.
|
Ratysz's PR has been merged, and it's pretty slick. The API looks okay, we'll leave it as it is for now and play around with it, and see if there's anything we want to change or that needs fixing. In 0.5.0 it should become the main API. |
This comment has been minimized.
This comment has been minimized.
|
Pulled a bunch of the
We need an API where we can:
|
This comment has been minimized.
This comment has been minimized.
|
Random pondering:
|
This comment has been minimized.
This comment has been minimized.
|
Figured it out. Also, bitmap fonts should be entirely separate from this and part of their own crate, since they can just be implemented using |
icefoxen
added a commit
that referenced
this issue
Jun 25, 2018
This comment has been minimized.
This comment has been minimized.
|
DONE IN 2ae4841 |
icefoxen
closed this
Jun 25, 2018
This comment has been minimized.
This comment has been minimized.
trit
commented
Jun 26, 2018
|
@icefoxen Regarding this, I'm getting the following when running the hello_world example:
|
This comment has been minimized.
This comment has been minimized.
|
Yeah that's because I'm in the middle of tearing apart and redoing a bunch of drawing stuff... ...or because I did something dumb. Are you working off of 2ae4841 or a later version? |
This comment has been minimized.
This comment has been minimized.
trit
commented
Jun 27, 2018
|
Alright, I was on e056397 which had the change to draw function using the non-reference version of D |
This comment has been minimized.
This comment has been minimized.
|
Yeah, if I was smart I would have made that stuff part of its own branch; I'm not used to people being interested enough to track |
This comment has been minimized.
This comment has been minimized.
trit
commented
Jun 27, 2018
|
No problem, thanks for helping figure out what was happening and all the work you're doing. Excited to see the SDL dependency removed |
ishitatsuyuki commentedAug 28, 2017
It's a high quality text rendering library with line breaking handling, which should be better than the current codebase.