I've implemented a simple rectangle packing algorithm, which I want to use for the font texture.
The algorithm is only 40 lines long. It keeps track how far each row is already filled and greedily inserts rectangle at the place where they are "most to the left", starting with the tallest rectangles.
I've did a larger refactoring of the "level" generation in order to allow infinite levels.
Each room is created individually and on creation a number of corridors are created. Each corridor has "portal" at the end connecting to another room. Rooms are only loaded once the player enters a corridor. This way only two rooms have to be loaded at a time.
Prototype to write in books. I will have to refactor input handling. Currently I'm passing a big struct with the state of each key into the update function. This does not work well for typing.