Comments (12)
It's funny you mention that now as I'm just considering this morning including the Ponder and Lua dependencies to make development and testing easier.
How big is the source in kb?
I don't really want to include binaries. So it would have to all build from source.
from gwork.
I guess the options for this are:
- Include binaries, but then you have to include them for all platforms, and then you also get the shared/static problem. 😱
- Include the source code. ☯️
- Include as a git submodule. Then just build using script. 👍
- Include as git subrepo. This is good if you want to work on the repo and export the changes. 👍
Lua and Freetype could be included as submodules. Ponder I think I'll include as subrepo as I'm still developing it and I'm fed up of writing configs and tests in instead of doing development.
from gwork.
I like the subrepo/submodule idea. It's better than including the source directly and much better than including the binaries.
I'll go ahead and get started on this when I have some time to dedicate :)
I figure I would integrate it into the base renderer? After pondering over the source code this seems like the most appropriate place to do it.
from gwork.
I think submodules will be best as there should be no need to edit the FT source.
Please make sure you do the work in a new branch, perhaps "feature/freetype". This makes the whole PR process so much easier!
What functionality will this work add? Common FreeType render to bitmap, and caching of glyphs? The STB header does most of this.
It might be best to do most of this in a ResourceLoader. I wouldn't do it in the base renderer as not all the renderers will use it. If there is common functionality there, perhaps create an intermediate FreeTypeRenderer, which derives from Base, and then the common client renders derive from this.
from gwork.
DirectX11, Irrlicht3D, OpenGL, SDL2, and Software have no native support for text rendering.
- Allegro5 has font support cross platform.
- DirectX11 does have native support, and uses it.
- SDL2 has the TTF library, so that does have font support (and it is good).
- OpenGL uses the STB library (which uses FT), and there is a debug font version.
- Does Irrlicht just need to link to FT?
What is the problem we're trying to solve here?
from gwork.
SFML uses FreeType already. 😉
from gwork.
I want to provide users with the ability to use TTF fonts directly from the library without having to integrate their own methods when the platform doesn't provide text rendering (like software renderer) or if the platform only provides text rendering from bitmap fonts (in which case they would end up doing their own integration of freetype at some point).
SFML and Allegro have TTF font support and so does SDL2 if you use their optional plugin.
I believe the rest only support bitmap fonts or no direct font rendering at all.
Nonetheless I just want to make sure you want this a part of your library before I write the code ;)
from gwork.
What will you provide that STB_truetype doesn't supply already? The renderers that use this header library effectively do what you say. Have a look at the software renderer.
I can't remember if it supports glyph caching so that could be something to add. Fontstash could be added for this.
from gwork.
Oh my I was completely unaware you included that! This is a non-issue now ;)
from gwork.
No probs. Thanks for the offer. I'm sure you find another feature to add/improve if you're keen. E.g. I'd like to make the skinning more data driven.
from gwork.
Personally like how you can define all the texture coordinates through internal functions. Maybe if those functions then saved their values to a .json or .xml file which could be externally edited, that would work quite well.
In the past I've manually bound GWEN to Lua. It was a huge undertaking and about a week long process but the end result was very good. A good portion of that time was spent researching the best route to take so it could be done a bit quicker a second time around.
from gwork.
Personally like how you can define all the texture coordinates through internal functions. Maybe if those functions then saved their values to a .json or .xml file which could be externally edited, that would work quite well.
The problem is that the code is hardcoded to a texture then. I think a skin should have the ability to be quite different.
Yep, I thought about doing something similar: dumping all the coordinates out at runtime into JSON.
In the past I've manually bound GWEN to Lua. It was a huge undertaking and about a week long process but the end result was very good. A good portion of that time was spent researching the best route to take so it could be done a bit quicker a second time around.
Wow, yes, that is a big job. I've always used auto binding for that kind of thing, like tolua. If you look in the "ponder" branch of Gwork I'm using Ponder to expose the API. Ponder allows Lua to use the data. It could also be set up to use JSON or XML to load skin and saved UIs.
from gwork.
Related Issues (20)
- Created a Discord server for anyone that wants to chat on GWorK
- Segfault when clicking on ImagePanel in GworkAllegro5Sample HOT 2
- CacheToTexture Never Updates Cached Textures? HOT 1
- Refactor colour picker HOT 1
- Reduce compiler coverage in tests
- "LARGE_INTEGER" and "QueryPerformanceCounter" problem HOT 2
- Can't build OpenGL sample with MinGW HOT 1
- Can't use GWork as cmake `subdirectory`. HOT 1
- Fix OpenGL Core for OSX HOT 2
- OpenGL* renderer: UTF-8 multi-byte symbols are not rendering HOT 17
- GLFW input handler is now working with GLFW3 HOT 1
- Resource management refactoring HOT 12
- Add WYSIWYG editor
- Support multiple renderers
- Add Font Module
- Investigate Gwk::Utility::Widen too slow HOT 1
- SFML2 Compile fails - Linux Mint 18.3 HOT 2
- Error: expression in new-declarator must have integral or enumeration type HOT 1
- OpenGL renderer broken HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gwork.