Use gimp_fonts_wait(), added in the previous commit, to wait for
fonts to finish loading before operations that depend on font
availability. In particular, this includes font- and text-related
PDB functions, and text-layer rendering.
gimp_font_util_pango_font_description_to_string() isn't needed any
longer as this was fixed long ago in pango itself (and we require a much
higher version anyway). See Pango bug #166540 (at GNOME Bugzilla).
Uodate Pango required version and stop using the deprecated
pango_cairo_font_map_create_context(). Compile with
PANGO_DISABLED_DEPRECATED for pango < 1.30.
Call pango_cairo_font_map_new_for_font_type (CAIRO_FONT_TYPE_FT)
instead of pango_cairo_font_map_new ().
This avoids a crash on Windows where the default font map is for
CAIRO_FONT_TYPE_WIN32. For the text tool we want freetype and
fontconfig -based fonts.
This requires using a cairo that includes the freetype backend, and a
pango that has been built against such a cairo. That is not yet the
case for the "official" Windows binaries of cairo and pango, but I
will make it so in the future.
* app/core/gimpimage.[ch]: make the parent parameter public in
add_layer(), add_layers(), add_channel() and add_vectors().
* app/vectors/gimpvectors-import.[ch]: add parent parameters to
the vectors import functions.
* app/core/gimpchannelundo.[ch]
* app/core/gimplayerundo.[ch]
* app/vectors/gimpvectorsundo.[ch]
* app/core/gimpimage-undo-push.[ch]: remember the parent item when
removing layers, channels and vectors.
* app/actions/channels-commands.c
* app/actions/debug-commands.c
* app/actions/edit-commands.c
* app/actions/layers-commands.c
* app/actions/vectors-commands.c
* app/core/gimp-edit.c
* app/core/gimpimage-duplicate.c
* app/core/gimpimage-merge.c
* app/core/gimpimage-quick-mask.c
* app/core/gimplayer-floating-sel.c
* app/core/gimpselection.c
* app/core/gimptemplate.c
* app/dialogs/file-open-dialog.c
* app/display/gimpdisplayshell-dnd.c
* app/text/gimptext-compat.c
* app/tools/gimptexttool.c
* app/tools/gimpvectortool.c
* app/widgets/gimptoolbox-dnd.c
* app/xcf/xcf-load.c
* tools/pdbgen/pdb/image.pdb
* tools/pdbgen/pdb/paths.pdb
* tools/pdbgen/pdb/vectors.pdb: pass NULL as parent item to above
functions and add FIXMEs all over the place because there is some
more hacking needed to make adding with index = -1 (on top of the
current item) work again.
* app/pdb/image-cmds.c
* app/pdb/paths-cmds.c
* app/pdb/vectors-cmds.c: regenerated.
* app/core/gimpimage-duplicate.c: duplicate the original image's
tree structure in the copy.
* app/widgets/gimpitemtreeview.[ch]: add parent to GimpAddItemFunc,
add utility function gimp_item_tree_view_get_drop_index() which
figures where to add something dropped to an item tree.
* app/widgets/gimpchanneltreeview.c
* app/widgets/gimplayertreeview.c
* app/widgets/gimpvectorstreeview.c: changed accordingly, using above
new GimpItemTreeView API.
2009-01-17 Michael Natterer <mitch@gimp.org>
* all files with a GPL header and all COPYING files:
Change licence to GPLv3 (and to LGPLv3 for libgimp).
Cleaned up some copyright headers and regenerated the parsers in
the ImageMap plugin.
svn path=/trunk/; revision=27913
2008-10-30 Sven Neumann <sven@gimp.org>
* app/text/gimptextlayout.c: fixed order of includes.
* app/text/gimptext-compat.c: ported to PangoCairo like the rest
of the text rendering code.
svn path=/trunk/; revision=27481
2008-10-09 Michael Natterer <mitch@gimp.org>
Add GEGL_CFLAGS and #includes as if gimpdrawable.h and gimpimage.h
had a GEGL dependency (they will have in the next commit, but I
wanted to keep the commit separate).
* app/dialogs/Makefile.am
* app/file/Makefile.am
* app/gui/Makefile.am
* app/menus/Makefile.am
* app/paint/Makefile.am
* app/plug-in/Makefile.am
* app/text/Makefile.am
* app/vectors/Makefile.am
* app/widgets/Makefile.am
* app/xcf/Makefile.am: add GEGL_CFLAGS.
* app/actions/*.c
* app/core/*.c
* app/dialogs/*.c
* app/display/*.c
* app/file/*.c
* app/gui/*.c
* app/menus/*.c
* app/paint/*.c
* app/pdb/gimppdb-utils.c
* app/pdb/gimpprocedure.c
* app/plug-in/*.c
* app/text/*.c
* app/tools/*.c
* app/vectors/*.c
* app/widgets/*.c
* app/xcf/*.c: add <gegl.h> or replace <glib-object.h> by <gegl.h>
to all files which include a drawable subclass or gimpimage.h
* tools/pdbgen/app.pl: include <gegl.h> instead of <glib-object.h>
in all generated files.
* app/pdb/*-cmds.c: regenerated.
* data/images/gimp-splash.png: the goat is still sleeping.
By Aurore Derriennic.
svn path=/trunk/; revision=27202
2008-10-09 Michael Natterer <mitch@gimp.org>
Remove the last code duplication from the undo system (or if not
the last then at least the most ugly):
* app/core/gimpimage.[ch] (gimp_image_add_layer,channel,vectors):
add "gboolean push_undo" parameter and add the item without
touching undo if it's TRUE. Changed assertions from
g_object_is_floating() to !gimp_item_is_attached() so they also
take items from the undo stack and not only newly created ones.
(gimp_image_remove_layer,channel,vectors): add "push_undo"
parameter here too. Also add a "new_active" parameter where an
optional new active item can be passed.
(gimp_image_remove_layer,channel): these functions must not be
called with push_undo=FALSE and a floating selection attached to
the layer/channel. This can't currently happen; added warnings in
case other code is changed and makes it happen anyway.
* app/core/gimpchannelundo.c
* app/core/gimplayerundo.c
* app/vectors/gimpvectorsundo.c: use above functions to add/remove
items instead of duplicating (parts of) their code. Pass
push_undo=FALSE and the previously active item to the remove()
functions.
* app/actions/channels-commands.c
* app/actions/edit-commands.c
* app/actions/layers-commands.c
* app/actions/vectors-commands.c
* app/core/gimp-edit.c
* app/core/gimpchannelundo.c
* app/core/gimpimage-crop.c
* app/core/gimpimage-duplicate.c
* app/core/gimpimage-merge.c
* app/core/gimpimage-quick-mask.c
* app/core/gimpimage-scale.c
* app/core/gimplayer-floating-sel.c
* app/core/gimplayerundo.c
* app/core/gimpselection.c
* app/core/gimptemplate.c
* app/display/gimpdisplayshell-dnd.c
* app/text/gimptext-compat.c
* app/tools/gimptexttool.c
* app/tools/gimpvectortool.c
* app/vectors/gimpvectors-import.c
* app/vectors/gimpvectorsundo.c
* app/widgets/gimpchanneltreeview.c
* app/widgets/gimpitemtreeview.[ch]
* app/widgets/gimplayertreeview.c
* app/widgets/gimptoolbox-dnd.c
* app/widgets/gimpvectorstreeview.c
* app/xcf/xcf-load.c
* tools/pdbgen/pdb/image.pdb
* tools/pdbgen/pdb/paths.pdb: changed accordingly (pass TRUE
unless it's a new image like when loading and XCF file).
* app/pdb/image-cmds.c
* app/pdb/paths-cmds.c: regenerated.
svn path=/trunk/; revision=27200
2008-07-27 Sven Neumann <sven@gimp.org>
* app/text/gimptext-compat.c (text_get_extents): applied the
same
workaround for a memory leak in PangoFT2 (bug #143542) as was
applied long ago in gimptextlayout.c.
svn path=/trunk/; revision=26324
2008-07-27 Sven Neumann <sven@gimp.org>
* app/text/gimptext-compat.c (text_get_extents)
* app/text/gimptextlayout-render.c (gimp_text_layout_render):
use the readonly variant of pango_layout_iter_get_line().
svn path=/trunk/; revision=26323
2005-02-09 Manish Singh <yosh@gimp.org>
* app/text/gimpfont-utils.[ch]: new function to workaround pango
bug #166540, by tacking on a ',' to font names that end in numbers,
so pango_font_description_from_string doesn't interpret it as a size.
* app/text/Makefile.am: add above files.
* app/text/gimpfontlist.c
* app/text/gimptext-compat.c: use new function.
* app/text/gimptext-xlfd.c: also make sure font names pulled out
from XLFD don't end in numbers.
* app/text/gimpfont.c
* app/text/gimptextlayout.c: remove some redundant checks.
2004-01-26 Michael Natterer <mitch@gimp.org>
* plug-ins/script-fu/scripts/unsharp-mask.scm: add the layer to
the image before pasting to it. Fixes bug #132504.
Fixed the underlying problem: make it impossible to attach
floating selections to drawables which are not currently part of
the image's layer or channel stacks.
Also cleaned up image <-> floating_sel interaction:
* app/core/gimplayer-floating-sel.[ch] (floating_sel_attach):
added assertion that the drawable is part of the image (see below).
Don't call gimp_image_floating_selection_changed(), it's emitted
by gimp_image_add_layer() now.
(floating_sel_remove)
(floating_sel_anchor): don't emit "floating_selection_changed",
it's emitted by gimp_image_remove_layer() now.
(floating_sel_anchor): removed the fix for bug #132162 because
gimp_image_remove_layer() behaves correctly now (see below).
Renamed floating_sel_reset() to floating_sel_activate_drawable().
Added g_return_if_fail() all over the place.
* app/core/gimpimage.[ch]: added new function gimp_image_owns_item()
which return TRUE if the passed item is part of the image.
(gimp_image_add_layer): emit "floating_selection_changed" here if
needed.
(gimp_image_remove_layer): emit "floating_selection_changed" if
needed, don't try to activate a layer if we called
floating_sel_activate_drawable().
This is the real fix for bug #132162.
* app/core/gimpimage-undo-push.c (undo_pop_layer): apply the same
fixes as to gimp_image_add,remove_layer(). Don't call
gimp_drawable_invalidate_preview() on the previously active layer
because that's done by gimp_image_set_active_layer() now.
* app/xcf/xcf-load.c: remember the "floating_sel_drawable" in the
XcfInfo struct and attach it *after* all layers and channels are
loaded to avoid attaching the floating selection to an
out-of-image drawable.
* app/core/gimp-edit.c (gimp_edit_paste)
* app/core/gimpdrawable-transform.c (gimp_drawable_transform_affine,
gimp_drawable_transform_flip, gimp_drawable_transform_rotate)
* app/core/gimpselection.c (gimp_selection_float)
* app/text/gimptext-compat.c (text_render): added checks for
gimp_image_owns_item() in all functions which can produce
floating selections.
* tools/pdbgen/pdb/edit.pdb
* tools/pdbgen/pdb/floating_sel.pdb
* tools/pdbgen/pdb/selection.pdb
* tools/pdbgen/pdb/text_tool.pdb
* tools/pdbgen/pdb/transform_tools.pdb: added checks for
gimp_item_owns_image() and return an execution error if invoked
with a drawable which is not part of the image.
* app/pdb/edit_cmds.c
* app/pdb/floating_sel_cmds.c
* app/pdb/selection_cmds.c
* app/pdb/text_tool_cmds.c
* app/pdb/transform_tools_cmds.c: regenerated.
2003-11-05 Sven Neumann <sven@gimp.org>
* app/app_procs.c: register a log handler for the Gimp-Text domain.
* app/text/gimpfont.c: code cosmetics.
* app/text/gimptext-compat.c: removed debugging output.
Let GIMP work w/o any fonts. Of course you won't get any text
functionality then:
* app/text/gimpfontlist.c: don't install any font aliases if no
fonts were found.
* app/text/gimptextlayer.c: refuse to render any text layers when
the GIMP fonts list is empty.
* app/tools/gimptexttool.c: removed redundant includes.
* app/tools/gimptextoptions.c: removed the font selection widget.
This is a temporary regression that will be cured by improving the
GimpFontView widget.
* app/widgets/Makefile.am
* app/widgets/gimpfontselection-dialog.[ch]
* app/widgets/gimpfontselection.[ch]
* app/widgets/gimppropwidgets.[ch]: removed the font selection and
all references to it. Fixes bug #119267.
2003-10-01 Sven Neumann <sven@gimp.org>
* app/text/gimptext-compat.c (text_get_extents): set a default
resolution on the fontmap since Pango doesn't seem to do this for us.
2003-06-03 Sven Neumann <sven@gimp.org>
* app/text/gimptext-compat.c (text_get_extents): need to get
ascent and descent from a PangoLayoutLine. Report negative descent
so the function behaves like it used to in 1.2.
2003-03-28 Sven Neumann <sven@gimp.org>
* app/text/gimptext-compat.c: respect the antialias parameter.
* app/text/gimptext.[ch]
* app/text/gimptextlayout.c: added autohint property that allows
to force the use of the Freetype auto-hinter.
* app/tools/gimptextoptions.c: added check buttons for autohint
and antialias. You need to patch PangoFT2 if you want to the
antialias setting to have any effect (see #109370).
2003-03-25 Sven Neumann <sven@gimp.org>
* Makefile.am
* gimpintl.h: removed this header file.
* gimpmiscui.c: include libgimp-intl.h.
* gimp.c (gimp_main): call setlocale() and bind to the libgimp
textdomain so that plug-ins don't need to do that explicitely.
* libgimp/stdplugins-intl.h: added the functionality that used to
live in gimpintl.h and removed the libgimp related stuff. Got rid
of the INIT_I18N_UI() macro.
* plug-ins/*/*.c: removed all occurances of INIT_I18N_UI().
Plug-ins simply call INIT_I18N() once in their run() function.
* plug-ins/script-fu/script-fu-intl.h: added the functionality
that used to live in gimpintl.h and removed the libgimp related
stuff.
* app/Makefile.am
* app/gimp-intl.h: new file that defines the gettext macros for
the GIMP core.
* app/*/*.c: include gimp-intl.h instead of libgimp/gimpintl.h.
* plug-ins/script-fu/scripts/test-sphere.scm: fixed typos.
2003-02-14 Michael Natterer <mitch@gimp.org>
Fixed most of the bugs the Script-Fu logo scripts triggered:
* app/core/gimpdrawable-bucket-fill.[ch]
(gimp_drawable_bucket_fill): added "gboolean do_seed_fill"
parameter instead of assuming TRUE.
(gimp_drawable_bucket_fill_full): moved "color" and "pattern"
parameters to the end.
* app/tools/gimpbucketfilltool.c
* app/display/gimpdisplayshell-dnd.c
* app/widgets/gimpdrawablelistview.c: changed accordingly.
* tools/pdbgen/pdb/misc_tools.pdb: only pass TRUE if the selection
is empty. Restores old PDB behaviour.
* app/core/gimpimage-undo.c (gimp_image_undo_group_end): return
early if gimage->undo_on is FALSE. Fixes bogus criticals.
* app/core/gimpimage.c (gimp_image_add_[layer|channel|vectors]):
clamp the passed position to sane values before calling
gimp_container_insert() (Scripts adding layers at wrong indices
are broken but should not crash the core).
* tools/pdbgen/pdb/paint_tools.pdb: need to copy the relevant
paint parameters from the current context now that the paint
options are contexts themselves.
* tools/pdbgen/pdb/palette.pdb: removed useless includes.
(Mostly) fixed text PDB functions:
* app/text/gimptext-compat.[ch] (text_render): don't set
text->font_size = -1 but get the size from the PangoFontDescrition.
(text_get_extents): return the logical_rect, not the ink_rect
because the size of the created text layer will be the logical_rect.
* tools/pdbgen/pdb/text_tool.pdb: removed text_fontname_create()
utility function and the usage of pass_through and implement all
invokers in-place, using the correct parameters.
* plug-ins/script-fu/siod-wrapper.c: fixed BG-IMAGE-FILL compat
define so we can BG fill again. Cleaned up color handling code.
* plug-ins/script-fu/scripts/coolmetal-logo.scm
* plug-ins/script-fu/scripts/glossy.scm
* plug-ins/script-fu/scripts/land.scm
* plug-ins/script-fu/scripts/lava.scm
* plug-ins/script-fu/scripts/test-sphere.scm: use new gradient names.
* app/pdb/misc_tools_cmds.c
* app/pdb/paint_tools_cmds.c
* app/pdb/palette_cmds.c
* app/pdb/text_tool_cmds.c: regenerated.
2003-01-31 Sven Neumann <sven@gimp.org>
* app/core/core-enums.[ch]: added new enum GimpGravityType.
* app/text/gimptext.[ch]
* app/text/gimptextlayer.[ch]: added support for specifying a
fixed layer size and how to position the text inside the layer.
* app/text/gimptext-compat.c
* app/tools/gimptexttool.c: changed accordingly.
2003-01-31 Sven Neumann <sven@gimp.org>
* app/config/gimpconfig-params.h
* app/config/gimpcoreconfig.c: added a pixels parameter to the
GIMP_CONFIG_INSTALL_PROP_UNIT() macro.
* app/core/Makefile.am
* app/core/gimpimage-text.[ch]: removed these two files.
* app/text/Makefile.am
* app/text/gimptext-compat.[ch]: new files with compatibility
routines that provide the old text API (solely for PDB calls).
* app/text/gimptext-render.[ch]: new files with text rendering
routines (not much yet).
* app/text/text-types.h
* app/text/gimptextlayer.[ch]: new object derived from GimpLayer.
* app/text/gimptext.[ch]: prepared for future improvements.
* app/pdb/text_tool_cmds.c
* app/tools/gimptexttool.c
* tools/pdbgen/pdb/text_tool.pdb: changed accordingly.