Commit Graph

36 Commits

Author SHA1 Message Date
c6af151b00 Bugfix #4536
FTF_GetStringWidth() was calling for translations, whilst translation was
not set even, causing crashes in strings.
Probably this was instable for many cases using Internation Font...
2006-07-02 13:08:27 +00:00
77506aa141 Fix #4353
Fixed a case where loading an invalid font crashed blender.

Now displays a message advising "invalid font selection" and
reverts to default 'built-in' international font.

Credits to Elubie for pointing out the problem function!
2006-06-19 19:53:27 +00:00
ad9ee622e8 Bug fix #2636
New AA font drawing (using texture) didn't get initialized on startup,
only when button was pressed. Confusing code... we need to remove all
#ifdefs here once.
2005-05-28 13:22:09 +00:00
f49d7133d0 - removed unused variable 2005-03-25 14:28:51 +00:00
8e92ee8684 - remove all obsolete inclusions of BLI_winstuff.h (due to recent changes)
NOTE: BLI_winstuff.h was meant to be a wrapper around windows.h to handle
undefining various crap that windows.h defines. Platform specific headers
should only have to be included in a few places. This reduces the number
of inclusions of BLI_winstuff.h to 16 which is a much more reasonable
number (than the 144 or whatever it used to be)
2005-03-19 21:08:13 +00:00
c78e44cdc5 big warning hunt commit
lot of casts, added prototypes, missing includes and some true errors
2005-03-09 19:45:59 +00:00
a7afceb622 Fixed very old annoyance;
If the startup file ".Blanguages" is not found, Blender now will only printf
a warning if started in debug mode (-d). It used to popup a menu, even
before the UI was initialized, causing annoyance... it's irrelevant info.
2005-03-01 15:29:01 +00:00
136ecd4644 Modified interface texture font support, which should work nicely with the freshly added bFTGL library.
Also removed some redundant #include's on some files.
2005-01-21 14:48:03 +00:00
9fddd2bdec Added experimental option to use GL textured interface fonts.
Set preferred method in userprefs->language & font.
Kinda requested by Kaito, i'm sure he regrets after seeing
my code changes.

This commit includes a patch provided by Jacques Baurain,
which seemed nescessary to handle font sizing properly.
Thank you !
2005-01-19 13:53:43 +00:00
061cde65a6 To end the issues with AA (International) Fonts; the .bfont.tff now is
compiled in (datatoc) and doesn't need installation anymore.

Also reviewed weird path conventions for searching AA fonts;

- U.fontdir is only used as standard search path for fileselecting
- U.fontname stores only full path to AA font if used one
- If a font cannot be found, it always falls back to the compiled in one
- If .B.blend is saved with default font, U.fontname is not set

Also added a button in usermenu "restore default".

When this works as expected, I'll commit changes for installation too.
2004-11-08 15:46:57 +00:00
7f61882413 Typo in path searching for ttf fonts... needed a trailing "/" 2004-11-08 11:15:31 +00:00
5b0e27de5c More closely implement the Installation Policy
<http://www.blender3d.org/cms/Installation_Policy.352.0.html>

- Within those confines 'ERROR: File ".Blanguages" not found' won't show up
  again (all such bugs in tracker have already been closed, #745 for reference)

  And intrr, if it does, 'cp -a .blender ~' already :P


Of course, this issue should not be fixed on a per file basis (.Blanguages,
.bfont.ttf), but instead return the .blender dir location. Duplicating .blender
finding logic everywhere, sigh.

< jesterKinky> that's what I meant. for now this is ok to continue with, and then in a later stage correct it all in one bigger effort
< jesterKinky> and since you point code at policy url we all can get reminded of how it was supposed to go when cleaning it.
< LarstiQ> jesterKinky: yes, I meant to do a "grrrr, this is the last time I'm not fixing the underlying issue"
< LarstiQ> all your lazy coders are belong to me
< jesterKinky> set us up the superficial bugfix
2004-07-10 13:48:12 +00:00
5d3629fdd8 - Small improvement, check ~/.blender/.bfont.ttf instead of .blender/.bfont.ttf in cwd. 2004-05-13 14:21:08 +00:00
e0e14665fa quick fix -- bug #1217 (Unable to access AA fonts in Linux) 2004-05-12 20:30:18 +00:00
9936d28382 - switched a strcat and strcpy pair... doh! (well spotted b-ix!)
- appended "./blender" to %HOME% return for Win32. Is consistant now
  with the other returns for Win.
2004-05-06 21:40:38 +00:00
90e69b1a30 bug 1181
Inconsistancy... choose International Fonts, choose Load Font, then disable
International font, but still load a font: AA fonts magically are set. :)
2004-04-22 17:11:20 +00:00
0d0ab24e4a - zeroed out a variable before strcat()'ing! :)
- removed a rogue debug printf().
2004-04-21 19:03:22 +00:00
255cd235a3 - Returned multi-user support on Win2k/XP.
Now uses 'Application Data/Blender Foundation/Blender' instead of old
  "Not A Number" dir.

- Updated windows installer to make this change transparent for the
  users. It copies /.blender to the new location and displays a short
  message to advise them of the change
  (http://homepages.nildram.co.uk/~aphex/installer_msg.jpg).

- Installer also includes fix for opening blend files from explorer (patch provided by Valentin Ungureanu (vung) - thanks!)

Note to CVS users on Win2k/XP:  Although blender will continue to work
without changes, you should ideally copy the /.blender dir to
<app data>/Blender Foundation/Blender for the sake of correctness :)
2004-04-20 19:12:48 +00:00
4a8f52f619 Converted the Userpreference buttons to zr's new ButBit calls.
Also added USER_*  to each define located in DNA_userdef.h.
2004-01-13 14:50:45 +00:00
d8f8605098 - Bug fix: at osx, default AA font couldnt be written in .b.blend
(unless you manually install font)
- Bug fix: string for AA font was only 64 chars... made 256.

- Changed API for buttons aligning... it now detects automatic what rows
  are, or collums, and aligns buttons. This makes call easier:
  uiBlockBeginAlign(block);
  ... defBut....
  uiBlockEndAlign(block);
  Only works when you provide buttons in row order!
- made sure only 'rounded' theme uses this align stuff
- still work in progress.. I commit now because I leave to denmark for 2 days!

http://www.blender.org/bf/rt.jpg  <- now also groups with rows+collums
2003-11-14 15:49:26 +00:00
904c039e3c - added ifdef INTERNATIONAL for changes in interface.c
- changed switching to smaller/larger fonts, it now does only 1 pnt size.
  with standard font (11), medium is 10, small 9
2003-10-23 22:28:49 +00:00
9efe4b7f9a - AntiAlias fonts (FTF) now are used in three sizes, like the normal
fonts, and switched based at the window zoom.

  Might be something to tweak when to switch exactly, but it works
  cool!
2003-10-23 18:25:08 +00:00
7f5d06d638 Another mega commit... loadsof restructure, and a pretty good one! :)
- changed the BIF_DrawString() function. it used to work different for
  AA fonts  as for default fonts. Now it's identical. Setting color for fonts
  can just be done with OpenGL, for both font types.
  Removed: BIF_DrawStringRGB()
- added theme color options for Buttons
- recoded DefButton, so it automatically chooses the right color.
- had to remove a 1000 uiBlockSetCol() calls for that reason...
- uiBlockSetCol() still works, to override automatic color

- removed entirely the silly old color system (BIFColorID). All color
  calls can now be done with a BIF_ThemeColor() call, including fonts and
  buttons and opengl stuff

- all buttons in button header have headercolor by default

- recoded drawing icons, it was a really bad & old loop doing manually
  colorshading and blending... which was per pixel a load of code!
  Now it uses a single OpenGL call to blend or colorize. Quite faster!
- (as test, for review) icons don't colorize anymore with button color,
  but have a different alpha to blend in (when not active)


- recoded the entire interface_draw.c file...:
- drawing buttons is separated in three parts:
  1. main drawing function for text and icons
  2. free definable callback for button itself
  3. free definable callback for slider
- removed a load of redundant code for this!
- coded a minimal theme, and adjusted Matt's buttons to match new
  callback system

- adding new drawing themes is piece of cake now
- for coders, default 'themes' to be aware of:
  UI_EMBOSS : the themable drawing style
  UI_EMBOSSP: the pulldown menu system (apart from color not themable)
  UI_EMBOSSN: draw nothing, only text and/or icon
  UI_EMBOSSM: minimal theme, still in use for Logic and Constraintsa
  this can be set with uiBlockSetEmboss(block) or in the uiNewBlock() call.

TODO: make UI API call for button alignment

(plus removed another series of warnings from code...)

Plus: fixed bug in Matts commit: he used a 'short' button for an 'int'
2003-10-20 15:40:20 +00:00
e78bb262c2 - fixed redraw for copy button in new themes editor
- typo in include DNA_ListBase.h... has to be DNA_listBase.h
2003-10-17 15:12:45 +00:00
0321602b65 - The basic layer for Themes in place!
- currently only implemented for 3d window
- create as many themes you like, and name them
- default theme is not editable, and always will be defined at startup
  (initTheme)
- saves in .B.blend
- themes for spaces can become local too, so you can set individual
  3d windows at theme 'Maya' or so. (to be implemented)
- it uses alpha as well...!

API:
This doesnt use the old method with BFCOLORID blahblah. The API is copied
from OpenGL conventions (naming) as much as possible:

- void BIF_ThemeColor(ScrArea *sa, int colorid)
  sets a color... id's are in BIF_resources.h (TH_GRID, TH_WIRE, etc)

- void BIF_ThemeColorShade(ScrArea *sa, int colorid, int offset)
  sets a color with offset, no more weird COLORSHADE_LGREY stuff

- void BIF_GetThemeColor3fv(ScrArea *sa, int colorid, float *col)
  like opengl, this gives you in *col the three rgb values

- void BIF_GetThemeColor4ubv(ScrArea *sa, int colorid, char *col)
  or the one to get 4 bytes

ThemeColor calls for globals (UI etc) can also call NULL for *sa... this
is to be implemented still.

Next step: cleaning up interface.c for all weird colorcalls.
2003-10-17 14:02:08 +00:00
f234b44d47 - another huge commit! read this!
- removed src/buttons.c and include/BIF_buttons.h
- added src/buttons.txt, which is the old buttons.c for review and adding
  code to new panels structure

- changed internal events to match new buttonspace structure
- added tabs for new shading group of buttons
- removed loads of little warnings, -Wall now compiles src/ almost without
  error (hint: setenv NAN_QUIET to see it all better)

Now I'm ready to do actual buttons -> panels conversion. I will do the raw
versions first, others then can cleanup
2003-10-07 18:24:02 +00:00
cef267684e cvs maillist test. pls ignore. 2003-07-29 14:22:08 +00:00
0ed095bbb1 Removed the old INTERNATIONAL Drawstring constructions.
These are now handled through BIF_DrawString(...) in src/language.c,
where it chooses between the old BMF and the new FTF DrawString.
2003-07-14 13:48:44 +00:00
98752e5d92 Blender now correctly checks the current dir for /.blender/.Blanguages
on Windows
2003-06-05 18:36:27 +00:00
7032c26e0b removed the unnecessary #include. 2003-05-22 18:17:22 +00:00
d617df4793 - fixed 'double-click on blend file' errors on Windows -- INTERNATIONAL stuff now also checks the installation directory for /.blender, etc
- registering .blend files for WinNT/2000/XP now works correctly (settings remain after a reboot).
2003-05-22 18:06:25 +00:00
eca049b177 store locales, .Blanguage, and .bfont.ttf inside of Resources folder of
application bundle on OS X
2003-05-12 18:12:25 +00:00
331eb81e09 modified so .Blanguages and .bfont get loaded from .blender dir.
the path to the selected ui font gets stored in the U.fontdir userprefs.
fixed a fullscreen thingie for windows.
2003-05-12 14:23:03 +00:00
2552f05b31 modified to load the new .bfont.ttf correct 2003-05-11 17:44:05 +00:00
1f5ba2debd cleaned up language support for a release. 2003-05-09 12:48:21 +00:00
d7e7dc1928 Multilingual interface support added.
Added compileflag INTERNATIONAL to the 'release'
projectfiles for msvc and added the FTF_ftfont project
to the main blender project.
2003-05-03 12:59:33 +00:00