Commit Graph

148 Commits

Author SHA1 Message Date
Chris Danford 2f8a68671a global stuff goes in [Common], not [main] 2008-07-05 02:09:23 +00:00
Chris Danford 3175fcc1aa remove unused StrokeIsUnder 2008-07-04 22:44:20 +00:00
Chris Danford 0544328038 remove FontBaseZoom in favor of doubleres font textures. This is cleaner and doesn't have weird interactions with maxwidth, wrapwidthpixels, etc 2008-05-27 17:08:25 +00:00
Chris Danford 4d30695f08 add StrokeIsUnder font option 2008-05-05 22:34:34 +00:00
Chris Danford 3934e123e2 add DefaultStrokeColor for fonts to turn a Font's stroke layer off by default 2008-03-28 09:33:50 +00:00
Chris Danford d38f040487 Move stroke designation into font page name area (better than having 2 png files with identical names except for texture hints). Add FontBaseZoom to allow for double resolution fonts without setting the zoom to 0.5 for every BitmapText. 2008-03-27 22:23:21 +00:00
Glenn Maynard c9f9ab8c9f fix dumb parser (thought I fixed this long ago) 2008-03-14 22:00:40 +00:00
Chris Danford 4be68e9930 add loading of font stroke texture 2008-02-15 09:41:19 +00:00
Glenn Maynard a426b97bea more tolerant parsing 2008-01-10 20:35:17 +00:00
Chris Danford 252cb50316 warn on a font missing textures 2007-02-16 11:34:29 +00:00
Glenn Maynard 71b70c4cba split GetSourceToImageCoordsRatio(), GetSourceWidth(), GetTextureWidth()
into more correct X, Y versions
2007-02-08 21:35:43 +00:00
Steve Checkoway 4517499f0f lroundf -> lrintf. 2007-01-03 05:05:28 +00:00
Steve Checkoway eb0b26cd82 Float to int is slow on ppc. It requires a store, a big stall, and then a load. It's even worse on a G5 if the compiler is dumb (and let's face it, I'm using gcc here...). Just use lroundf when we want an int. It will certainly be no slower. 2007-01-02 23:36:44 +00:00
Steve Checkoway 30d9410b65 Unneeded. 2006-11-01 10:45:51 +00:00
Glenn Maynard 1a89ddfccd pointer to attributes 2006-10-03 00:07:01 +00:00
Glenn Maynard 83defce27b XML update 2006-10-02 22:52:57 +00:00
Glenn Maynard 8d465d99a6 unused code 2006-09-30 23:54:08 +00:00
Glenn Maynard 2b9d731dfd unused 2006-09-30 23:53:16 +00:00
Steve Checkoway 6ea2a41b00 Cleanup RageException::Throw(). Do not use ssprintf() inside of Throw() and do not pass it bare error messages. Use RageException::Throw( "%s", sError.c_str() ); instead. Be consistent with quoting file names "%s" and theme metrics as "%s : %s". Try to make them complete English sentences when possible. 2006-09-17 01:19:19 +00:00
Steve Checkoway b5f57abc4e longchar -> wchar_t 2006-09-14 09:32:04 +00:00
Glenn Maynard e206261b80 ARRAYSIZE -> ARRAYLEN 2006-09-13 03:11:38 +00:00
Steve Checkoway a07e194cf1 Revert. Fixes Linux build. 2006-07-18 05:51:37 +00:00
Jason Felds 366c3440d4 Fix VC8 macro redef warning. (more to come) 2006-07-18 03:56:37 +00:00
Chris Danford 80554fc6c1 style cleanup 2006-06-12 09:14:26 +00:00
Glenn Maynard a8d96a30c0 fix "range" keyword 2006-03-02 07:15:25 +00:00
Glenn Maynard 62a0ac1370 spacing 2006-02-14 11:16:39 +00:00
Chris Danford 7f821e8cfc CString -> RString 2006-01-22 01:00:06 +00:00
Chris Danford c7d769829a add ThemeManager to smtools 2005-12-29 05:52:50 +00:00
Chris Danford d698a5f1ec CString -> RString in RageUtil
ThemeMetric<CString> -> LocalizedString to eliminate dependencies
2005-12-20 08:35:47 +00:00
Chris Danford 37f82b43f7 remove CStringArray #define 2005-12-09 21:36:22 +00:00
Glenn Maynard cbce8648e7 cleanup 2005-11-01 15:00:50 +00:00
Glenn Maynard 7d3bb719f6 GetLineWidthInSourcePixels including overdraw causes a problem. Text is left-
aligned by default; we add the value of GetLineWidthInSourcePixels to right-
align (and n/2 to center-align).  This causes left-alignment to be flush, with
overdraw over the alignment (correct), but right-alignment to align against
the overdraw.  This causes fonts with borders to align with the border over
the edge on the left and against the edge on the right.

If we only include overdraw for cropping and scaling, and not positioning, then
we're inconsistent.  For example, if we have a border with 100 pixels of space,
and we scale to 100 pixels in this way, the text will be scaled to exactly 100
pixels, but if left- or right-aligned against the border, will overlap the border
and not actually use the whole space.  We need to be consistent: either consider
the overdraw part of the character or don't.

Ultimately, the overdraw was intended to not be considered part of the character
itself.  It's intended for use with fonts with borders/strokes/glow around lettering.
That causes every character in a font to be widened, usually uniformly.  This
tends to not increase the subjective width of the character: if aligning hard
against a border, these features should be ignored.  So, let's go back to the
original intent, and don't consider overdraw part of the character.
2005-10-31 14:56:27 +00:00
Glenn Maynard 64d9c29568 Simplify: store attributes in a simple map<CString,CString>, not in an object.
Makes attributes lighter.
2005-10-11 10:24:07 +00:00
Chris Danford a19f0b492a RTL cleanup 2005-09-22 16:49:51 +00:00
Chris Danford 1a7899e270 add support for Right to Left fonts 2005-09-22 09:08:11 +00:00
Chris Danford 48ebc53549 return NULL -> return CString() for clarity and efficiency 2005-09-04 16:55:21 +00:00
Glenn Maynard 6b87537086 Font paths must be prefix-unique, like other assets. cleanup 2005-09-03 00:17:37 +00:00
Chris Danford e439ae2a96 return "" -> return NULL 2005-09-02 00:14:07 +00:00
Glenn Maynard bf8ef93ac2 cleanup 2005-08-29 04:45:22 +00:00
Glenn Maynard db92df2fe1 FontPageSettings is a complex type; avoid unneeded copying 2005-08-26 18:33:42 +00:00
Glenn Maynard 221e369b7b long-needed style update. no non-cosmetic changes. 2005-05-19 06:55:31 +00:00
Glenn Maynard 01490f8f68 revert weird wrapping hack. I can't make sense of it, and it's causing
infinite loops.  Implement overdraw handling correctly.
2005-05-19 06:11:46 +00:00
Chris Danford fd94e4f38d don't warn about dimensions if texture is "_blank" 2005-03-21 07:40:23 +00:00
Chris Danford 981e52ec58 merge IniFile and XmlFile 2005-01-07 14:28:00 +00:00
Glenn Maynard 0e7c5a7141 ascii optimization 2004-10-01 17:25:17 +00:00
Glenn Maynard 3c997641f8 Remove game-specific glyphs. It adds overhead to setting every BitmapText,
and nothing uses it.  If we want to do this, add Lua conditionals to font
pages.
2004-09-27 13:33:08 +00:00
Chris Danford 03fbb915f3 remove VC6 scoping hacks 2004-09-21 07:53:39 +00:00
Glenn Maynard 0a11fe26df fix pages being given default maps that they shouldn't have 2004-09-09 02:59:15 +00:00
Chris Danford ff4c12b727 rename GameDef -> Game 2004-07-25 17:07:32 +00:00
Chris Danford 64628fac21 remove enum Game. Instead, pass around the GameDef pointer 2004-07-25 04:27:20 +00:00