Age | Commit message (Collapse) | Author |
|
|
|
* Convert all code to use new functions.
* Branch maintainers may want to skip this commit, and run this
conversion script instead, if they use a lot of math functions
in new code:
http://www.pasteall.org/9052/python
|
|
* There's an unresolved error in transform_conversions.c which I've flagged in this commit. I'm not quite sure what the exact intentions of that code were (i.e. was the "void_pointer = 1" really intended)
|
|
- BLF_lang_init used confusing IFDEF's, unlikely this was well tested. Split this into 3 functions for Apple/Win32/Unix, Unix uses BLI_gethome_folder(), cant test others, ideally they should use BLI_gethome_folder too but needs testing.
Possibly each os cant be made to use BLI_gethome_folder and the separate func's can be removed (please test).
- units, hectometers were displayed wrong.
|
|
particularly text including spaces. This gave some problems with placing
the cursor and selection, and clipping text inside buttons.
|
|
|
|
lzma.
I rename the original makefile of lzo (Makefile.bak) and a new one.
Also four new option for user-def.mk:
WITH_LZO, default true
WITH_LZMA, default true
NAN_LZO, default extern/lzo
NAN_LZMA, default extern/lzma
It's easy add support for system libs (using lzo and lzma from OS) but I don't
know if it have much sense.
Note that I can't test the "unsigned char" buffer because the OGL animation
is not working (right ?), but is the same code that for float also the new
Makefile work fine here (Linux), but maybe need some tweak on other OS.
|
|
A couple of new functions:
BLF_width_and_height - Merge of BLF_width and BLF_height in one call to avoid freetype2 stuff.
BLF_buffer - Set the buffer, size and number of channel.
BLF_buffer_col - Set the text color (the alpha is not used right now).
BLF_draw_buffer - Draw the text in the current buffer.
Also tweak a little the boundbox and draw function to avoid access the freetype2 and use the cache info.
By default the font size is 12, the UI still need work to allow change the font and size.
|
|
Directories intern/ and source/blender/ now compile warning
free again here with scons/gcc.
|
|
|
|
As Joe point on a previous mail, glBitmap don't work nice
on all cards and also some of the things that we can do
with texture are hard (or need that blender check the font mode)
to implement.
|
|
|
|
The option of Texture or Bitmap font is working again, yes it's really
uuuuugly right now, but it work.
On the next commit I go to put this at the same level that texture font.
Change this from User Preferences -> Language -> Textued Fonts, save
the preferences and run blender again.
|
|
* Text window font size now supports full range 8-32, instead of
just 12 and 15. I added BLF_fixed_width to get the character
width of a fixed size font.
* Buttons do undo push on change again.
* Animated/Keyframe/Driver colors are now themable, with blend
value to blend with original color. Set this to 0.5 now to
give colors less constrast.
* Fix tooltip popping up with RMB menu open, and missing redraw.
* Autokeyframe now works for buttons.
* Driver expressions can be edited in place in a button now.
(still some refresh issues).
* Also made python driver default for the Add Driver function
in the RMB button. This way you don't have to open a Graph
editor if you just want to type an expression. Also, the
default expression then is the current value.
* Tooltips now show some extra info, not sure what is good to
have, but currently I added:
* Shortcut key for operator buttons.
* Python struct & property name for RNA buttons.
* Expression for driven values.
* Value for text/search/pointer buttons.
|
|
This are freetype2 options:
Unfitted - Scaled but un-grid-fitted kerning distances
Default - Scaled and grid-fitted kerning distances
We always use Unfitted, but the "Default" style give better result here,
so please test and if nobody complain we can set this style as the default.
|
|
Matt, I found the problem in one of my previous commit, so I revert
all my changes and now the font look good again.
Also remove all the options (kerning, overlap and user kerning), I want
to make this a little better.
|
|
Cleanup of scroller drawing in 2D windows.
Before:
http://download.blender.org/institute/rt11.jpg
After:
http://download.blender.org/institute/rt12.jpg
Will add 'zoom' widget circles later, as mockupped here:
http://www.reynish.com/files/blender25/fcurve_scrollbar.png
Also note the scale values are inside scroller; drawing it
on top conflicts with current frame item and markers.
Currently scroller disappear entirely when view is total.
For Joshua:
To make sliders behave nicely, the boundbox (v2d->tot) has to
be refreshed on each change. I've added it in graph drawing
now, but it could be notifier based I guess... not sure what
the correct anim api call would be. Can discuss tomorrow!
On todo:
Layout config hints so people can make scroller positions swap.
|
|
If this option is enable, the blenfont check for overlap characters, like
one of my previous commit but now it's optional and disable by default.
(This fix the "Fi" or other case when the characters are too close)
Enable/disable from:
Outliner -> User Preferences -> Styles -> Panel Font -> Overlap
(also for other styles, Group Label, Widget, Widget Label)
|
|
Two new function:
BLF_shadow: set the level (for blur) and the shadow color.
BLF_shadow_offset: set the x and y offset for shadow.
(this is the current position plus offset)
By default shadow is not enable in the font, so before draw the
text you need call BLF_enable(BLF_SHADOW), also remember disable
the option in the end.
|
|
(or like before).
|
|
The user value is 0 by default and the font kerning (the value
that come with the font) is enable, like always.
(the last was disable by mistake in a previous commit)
|
|
0.5 is the default value now, the range are from -5.0 to 5.0.
Note that we allow negative value, but the current draw code
always check for overlap characters.
|
|
This commit add two option to the blenfont library:
1) BLF_FONT_KERNING
This enable the kerning information that come with the
font, by default this option is disable and still don't
have a UI for change.
2) BLF USER_KERNING
This allow the user set a kerning value to by apply for
every character, by default this option is enable but all
the font have a kerning value of zero.
Ton I add this option to the style with a default value of 1.
Access from:
Outliner -> User Preferences -> Style -> FontStyle -> Kerning
|
|
Text drawing in 3D window fixed, using BLF default font (yes, nice AA'ed
fonts too :)
Solved it by gathering all strings that needs to be drawn for an object,
and then draw in end of object drawing, in pixelspace. Also cleaned up
some of the code for projecting 3d coords, much nicer now (mat stored in
region-view3d)
|
|
Fonts like Type 1, have one file with the glyph image and another
file with metrics and kerning information, this try to search if the font
have this information and load (try open the same file but with the .afm
and .pfm extension).
Also add a function to load the same information from memory, just in case
that in some point we add a font like this.
|
|
Now that we only work with Freetype2, I don't see any point to keep
wrapping the functions.
Also remove the reference code, it's something that we don't go to used.
|
|
1) Remove WITH_FREETYPE2 from code, so now blender always need freetype2
2) Remove the old bmfont
3) Remove ftfont and bFTGL library
4) Implement a new BLF_draw_default function for place that still need/use
the old BMF api.
I try to update both, scons and cmake, but I only can test with make, so
hope all work fine.
MSVC is broken, but I don't have Windows, things to search and fix are
any reference to WITH_FREETYPE2, FTGL and BMFONT (take in care that
blenkernel also have a BKE_bmfont.h, this don't have anything to do with bmfont).
Always have to link/include the freetype2 library
Remove any reference to libbmfont
Remove any reference to libftfont
Remove any reference to libbftgl (or libbFTGL)
|
|
A little cleanup on the internal font, it's possible load the old
bmfont with: BLF_load_mem(name, NULL, 0) where name can be: helv,
helvb or scr.
Note that the internal font also support both draw, texture and bitmap,
by default always used texture.
Remove some old lang function that I left there and don't exist any more
because the locale are now in the RNA.
Small changes to Style's, so if we build without freetype2 by default
go back to the internal font, this is a little ugly (and have the old
problem of scale) but now blender always show text (need work a little
more there).
|
|
- font->blur was uninitialized
- Use Ctrl+Alt+Shift+P to run scripts from the 3d view not Pkey. (still useful for testing)
|
|
space_info.c
|
|
Fixed & upgraded tooltips to new drawing system.
Also fixed small error in menu shadows. Rounding of shadow below
menu went wrong.
|
|
Nicer implementation of blurred font draw, moved to blenfont
module. Set it with BLF_blur(value). Current kernels implemented
are 3 and 5 only. Blenfont module can extend this once.
|
|
More font style work;
- hooked up almost all ui buttons code to new font
system, including text clipping
- panel headers scale now too to smaller fonts
- added further style hints, for shadow/emboss. Is all going to
be in UI designer control!
- for fun; changed layout engine to spread vertical buttons in
window width
Next: removal of all usage of old font system, using 'styles'.
Will also move font blurring to blenfont module.
|
|
The library can load any font supported by the Freetype2 library or
used the internal bitmap font.
With both types it's possible draw the text as texture or bitmap,
and using texture it's possible rotate, scale and clipping text.
Still have things to fix/add, but I think it's ready to move-on
and start droping the old api, most of (if it's not all) the
editors/interface/text.c will be remove, but some things still
has to be define, like:
* Where is store the fonts ? (default font, panel font, filesel font, etc)
I mean, every space have own fonts ? or we keep it on the context ?
It's not a really problem from the blenfont side, because every font
have reference number, so it's load only the first time.
* What we do about gettext ?
Keep the old system that call gettext inside the blenfont or replace
it for _() in the Blender source ?
Also things like pupmen has to be take care, if we want translate the menu.
Ok, time to sleep, back tomorrow to start moving the things :)
|
|
freetype2.
|
|
|
|
|
|
|
|
don't found any place that really use it.
|
|
|
|
This is the old bmfont library but using textures.
I made small test in the space Info and work fine,
commit now to finish tomorrow from work.
|
|
next commit add internal font and we can go ahead and remove
ftfont and bmfont.
|
|
|
|
function for aspect and rotation (and the new clipping).
Update source/Makefile to point to the new libed_sculpt_paint.
|
|
The rotation is through glRotatef and as you can see it's ugly,
the freetype2 allow apply a transformation (2x2 mat) to the glyph
before load, so I want to try using that.
Another thing to add is the 4x4 mat to get the scale and size from
there.. but I need commit this now to continue from my home.
|
|
Several things in one commit; could not split this up easily,
one job invoked another, and so on. :)
- Added pulldowns for save/load .blend file in top bar.
- To enable "Save" without further popups (save over)
I've added a signaling function in window header to
indicate a succesful save.
- On any undo push it now signals 'file changed'. This
goes by notifiers nicely, but now registers only the
undopushes, which is quite unreliable. "Changed" state
shows in header as "Blender*" and for OSX with the
standard close button black dot.
- Made screencast show a button in top bar indicating such,
and allowing quit. No hotkey for quit yet... but ESC will
keep casting now.
- Fixed new BLF_init(), which should be in WM_init() and not
on any .B.blend read.
- Fixed CTRL+F3 "Save Screenshot", which was still using old
fileselect code.
|
|
I change the #if 0 with #if WITH_FREETYPE2, also fix a lot of typos, etc.
This is the basic but now it draw text!!, I am using the "User Preference"
space to test the library, nobody is working on that and the option are
in the outliner now so...
TODO-next: using the 4x4 mat, string size, bounding box, aspect and rotate.
Notes: I update the Makefile, missing some include and other things so
maybe scons, cmake and msvc also need update ?
|
|
|
|
Also I remove some of the #if 0.
|
|
All the code have #if 0 / #endif so nothing to worry about.
|