Commit Graph

26 Commits

Author SHA1 Message Date
1b2d9b5ade Bugfix:
Ubuntu users can set up locales again (propably some other linux distros
 had same problem)
2006-05-25 15:36:38 +00:00
18a8479931 Bugfix #3665
Using "International Fonts" (silly name, it's pixmap fonts) the special
characters (values above 127) were disregarded completely.
This was caused with the extremely confusing unicode conversion call, which
actually only was needed when translations were set.

Disabling the unicode conversion then gives correct text drawing. However,
I suspect that this code will give issues for translations too... that I
cannot judge nor fix.
2006-04-11 12:27:50 +00:00
Ken Hughes
15a78cb9c8 Fix gcc warnings about NULL used in arithmetic comparison. 2006-04-02 20:19:30 +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
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
964e81d432 Uncommit changes for "bind_textdomain_codeset". Apparently windows gettext
doesn't have this function, needs to be updated in lib/ dir.

We also dont have official maintainer for internationalization...
2004-11-24 12:11:06 +00:00
d6a36633c5 Patch provided by Yann Vernier
This patch should make gettext return unicode, which is what freetype
expects (also explicitly set in the same file). It makes translations
that support non-ascii *and* non-unicode encodings, such as latin 1 for
western european languages, draw correctly. The problem only occurs for
platforms where those encodings are default, i.e. in Linux if
/etc/locale.gen looks like this:
sv_SE ISO-8859-15
If it were to read UTF-8 this patch doesn't change the behaviour at all.
This is probably the case for Mac OS X and perhaps Windows.
2004-11-23 12:19:18 +00:00
72fd0789a4 Casting added for unsigned/signed char weirdness in ftgl... 2004-11-08 17:09:16 +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
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
c427a19854 - FTF_TTFont didn't initialize fontm,fontl,fonts to NULL, leads to
possible bad free
 - FTF_Api.cpp used static C++ object, hard to understand and icky,
    was probably source of phase4's crashes, replaced with dynamically
    allocated object and added FTF_End to free it and sensible time.
2004-01-23 14:19:44 +00:00
abe3881a19 - added check before freeing a font pointer... dunno if its needed, but
better do this anyway!
  theres a 0.01% chance errors with AA goes away now on some platforms...
  but i doubt!
2003-11-22 16:59:54 +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
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
ef736e8bcc reverted to 2.27 original fontcoloring method
reverted to patched ftgl library.

speed improvements were not really noticable.
2003-05-16 12:48:38 +00:00
447dd3c959 Seeing all comments on the interface slowdown, I decided to try a different
approach for the coloring of interface texts. Currently two seperate fonts get
generated, one black and one white, which eliminates the glPixelTransfer
command. (which assumably caused the huge slowdowns)

Please try, and post your experiences on the interface drawing speed.
NOTE: for this new method you need the *unmodified* FTGL library:
http://homepages.paradise.net.nz/henryj/code/#FTGL

Apologies on any inconveniences...
2003-05-15 17:01:00 +00:00
3ce849949e doubled the size of the string to be translated, which fixes
the italian mo crash.
2003-05-14 10:01:36 +00:00
47aaca72e0 moved BKE_utildefines behind __APPLE__ #ifdef. 2003-05-13 09:28:39 +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
455bafbe3f added routine that checks for LOCALE/message directory. 2003-05-12 02:49:29 +00:00
950504c016 added Matt Ebb's new windowtype button 2003-05-10 10:36:14 +00:00
99bd02a98b store message catalogs in Resources folder of the application bundle on OS
X. Opening a file selector is no longer needed in order to switch the
language for the first time; apparently gettext wasn't too happy about
relative paths.
2003-05-09 20:20:40 +00:00
b43473e425 Multilingual interface support added.
All modifications are behind compileflag INTERNATIONAL,
and affect these two directories; source/blender/src and
source/blender/ftfont.

Thanks to philipp, a new utf8towchar() function is added
to Shizu's work, which fixes the international support for
OSX. It also makes the iconv library obsolete. This means
all translation files (blender.mo) need to be 'recoded' to
UTF-8, and language support in the fileselect window and
the text editor is not possible. Iconv might be added in
the future to enable these features.
2003-05-03 12:17:11 +00:00