Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Create a font provider interface, create a RocketTrueType lib and implement a new font provider #34

Open
wants to merge 26 commits into from
@crazyjul

This request contains the ability to have different font providers. Rocket core does not depend from truetype anymore and a RocketTrueTypeLib has been created. A BMFont provider ( font create with AngelCode's BMFont tool ) is also provided.

This implementation does not support effects for the moment.

@crazyjul

Anything we should do for this request to be reviewed?

@lloydw
Owner

Hey guys, just grabbed a copy of this and had a play, looks really good.

There's a couple adjustments I'd like to make before commiting it to core though, I'm happy to make these adjustments or leave it up to you, whichever you prefer.

  1. I'd like to generalise the LoadFont stuff, so rather than having to specifically talk to the correct FontProvider and get it to load the fonts, I'd like it so you just ask Rocket::Core::FontDatabase::LoadFont and it asks each provider to attempt the load, (provider could just check file extension etc). This way we don't need specific load code, we can just try load any font.

  2. I think the providers should be compiled directly into the Core library rather than being separate and we have a Config.h or something that allows you to enable which providers are compiled into the core. This way the providers can be initialised along with the core and we once again don't need any special initialisation.

These two changes will be the external rocket API's for loading fonts won't change so people won't be forced to update their projects, they can simply switch on and off FontProviders as they see fit.

@crazyjul

Ok, I'll work on that in the next days

crazyjul added some commits
@crazyjul crazyjul Merge Freetype and Bitmap font implementation inside RocketCore
CMake now contains an option to build without freetype

Conflicts:
	Build/cmake/FileList.cmake
38b415c
@crazyjul crazyjul Font provider can be accessed by old FontDatabase interface
The system now allows a single entry point for loading and using fonts.

Tha cmake option ROCKET_WITH_FREETYPE allows to build with our without freetype lib.

Samples have been updated to use this single entry point as well
4a3f716
@crazyjul crazyjul Fix samplers and debugger 8b19daa
@crazyjul

Change made as expected. I added an option in Cmake to compile without freetype. Otherwise, everything can be done through the unified interface of Rocket::Core::FontDatabase

@noizex

Any idea if these changes are going to be accepted?

@loki666

bitmap font would be great! please accept this merge

@hotgloupi

Bump ! Is this 2 years old pull request abandoned ?

@wheybags
Owner

It is something I definitely think would benefit the project, but it's kinda huge ;_; I'll try to take a look at it soon

@hotgloupi

bump !

@viciious

Would be nice to have merged but I suppose the changeset has bitrotted by now..

@i8degrees
@dwimsey
Owner

Age would be the primary blocker, getting a fresh version against master would be a start. It needs to merge cleanly and compile across the various supported platforms and actually work on them. Also as lloydw suggested, it'd need to not break backwards compat from an ABI perspective in order to go in sooner rather than later.

@i8degrees
@hotgloupi

@crazyjul I don't know where to ask this, but your fork (the master branch) is way behind the official libRocket master. Are you planning to merge the latest changes into your fork (which contains this very useful font provider feature) ?

@wheybags wheybags referenced this pull request in wheybags/freeablo
Closed

Loading and rendering original Diablo-fonts #122

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 9, 2012
  1. @crazyjul

    Fix warnings

    crazyjul authored crazyjul committed
  2. @crazyjul

    Create font providers interface and freetype package

    crazyjul authored crazyjul committed
  3. @crazyjul

    win32 project for freetype

    crazyjul authored
  4. @crazyjul

    Osx/Iphone projects

    crazyjul authored crazyjul committed
  5. @gogoprog @crazyjul

    CMake generation fixed.

    gogoprog authored crazyjul committed
  6. @crazyjul
  7. @TheThibz @crazyjul

    On master: basic, first implementation of BitmapFont

    TheThibz authored crazyjul committed
  8. @TheThibz @crazyjul

    Missing project

    TheThibz authored crazyjul committed
  9. @crazyjul

    Update project

    crazyjul authored
  10. @TheThibz @crazyjul

    added missing assets

    TheThibz authored crazyjul committed
  11. @crazyjul
  12. @crazyjul
  13. @crazyjul

    Fix leak

    crazyjul authored
  14. @crazyjul
Commits on Jan 10, 2012
  1. @crazyjul

    Restore Shell and samples

    crazyjul authored
  2. @crazyjul

    Cmake projects

    crazyjul authored
  3. @crazyjul
  4. @crazyjul

    Osx/iOs project updated

    crazyjul authored
Commits on Feb 10, 2012
  1. @crazyjul
Commits on Feb 17, 2012
  1. @gogoprog

    Removed useless log line.

    gogoprog authored
    Replaced some spaces by tabs.
Commits on Feb 29, 2012
  1. @gogoprog

    Added RemoveFontProvider in FontDatabase.

    gogoprog authored
    Cleaned some files.
Commits on Mar 1, 2012
  1. @gogoprog
Commits on Mar 15, 2012
  1. @gogoprog
Commits on Jul 6, 2012
  1. @crazyjul

    Merge Freetype and Bitmap font implementation inside RocketCore

    crazyjul authored
    CMake now contains an option to build without freetype
    
    Conflicts:
    	Build/cmake/FileList.cmake
Commits on Jul 9, 2012
  1. @crazyjul

    Font provider can be accessed by old FontDatabase interface

    crazyjul authored
    The system now allows a single entry point for loading and using fonts.
    
    Tha cmake option ROCKET_WITH_FREETYPE allows to build with our without freetype lib.
    
    Samples have been updated to use this single entry point as well
  2. @crazyjul

    Fix samplers and debugger

    crazyjul authored
Something went wrong with that request. Please try again.