Index: trunk/nv/position.hh
===================================================================
--- trunk/nv/position.hh	(revision 113)
+++ trunk/nv/position.hh	(revision 114)
@@ -102,4 +102,6 @@
 		void set_position( position p ) { lr = p + (lr - ul); ul = p; }
 
+		position ur() const { return position( lr.x, ul.y ); }
+		position ll() const { return position( ul.x, lr.y ); }
 		/**
 		 *Gets the dimensions of the rectangle.  Synonym for get_size.
@@ -159,4 +161,8 @@
 		 */
 		bool is_valid() const {	return x2 >= x1 && y2 >= y1; }
+		void expand( value_type value ) { position p(value,value); ul -= p; lr += p; }
+		void shrink( value_type value ) { position p(value,value); ul += p; lr -= p; }
+		rectangle expanded( int value ) { position p(value,value); return rectangle(ul-p, lr+p); }
+		rectangle shrinked( int value ) { position p(value,value); return rectangle(ul+p, lr-p); }
 		
 		/**
Index: trunk/src/gfx/texture_font.cc
===================================================================
--- trunk/src/gfx/texture_font.cc	(revision 113)
+++ trunk/src/gfx/texture_font.cc	(revision 114)
@@ -28,4 +28,5 @@
 	m_hinting( true ), m_filtering( true ), m_rlibrary( nullptr ), m_rface( nullptr )
 {
+	load_freetype_library();
 	size_t hres = 64;
 	FT_Error error;
Index: trunk/src/gui/gui_style.cc
===================================================================
--- trunk/src/gui/gui_style.cc	(revision 113)
+++ trunk/src/gui/gui_style.cc	(revision 114)
@@ -74,5 +74,5 @@
 	// check id
 	lua_getfield( m_lua, -1, cid );
-	if ( !lua_istable( m_lua, -1 ) )
+	if ( lua_istable( m_lua, -1 ) )
 	{
 		lua_getfield( m_lua, -1, centry );
@@ -83,5 +83,5 @@
 	// check class
 	lua_getfield( m_lua, -1, cclass );
-	if ( !lua_istable( m_lua, -1 ) )
+	if ( lua_istable( m_lua, -1 ) )
 	{
 		lua_getfield( m_lua, -1, centry );
@@ -91,5 +91,5 @@
 
 	// check entry
-	lua_getfield( m_lua, -1, cclass );
+	lua_getfield( m_lua, -1, centry );
 	if ( lua_type( m_lua, -1 ) == type ) return true;
 	return false;
