Commit 41a0eee0 authored by Lars Clausen's avatar Lars Clausen
Browse files

Crash fix, baseline fix, freetype-less fix.

parent 8bad14f1
2006-12-09 Lars Clausen <lars@raeder.dk>
* app/Makefile.am: Make it possible to compile without freetype by
excluding freetype files.
* app/diapsrenderer.c: Don't font_unref until you have
font_ref'd the font, in case it's the same font. Fixes crash.
Also adjust for baseline in text drawing.
2006-12-03 Lars Clausen <lars@raeder.dk>
 
* doc/en/usage-objects-special.xml: A few updates.
......
dia-0.96-pre1: 3-Dev-2006
* First release candidate for 0.96. Main improvements:
* Text rendering is now based on the TextLine objects, each of which
contain one line of text along with font and font height. This has
allowed proper control of text width and speedier rendering.
* Visio VXD files can now be imported and exported, thanks to Ian
Redfern.
* Renderer API change: Added function draw_text_line. Renderer (export)
implementations will need recompilation.
* Object API change: can_parent replaced by flags field.
* Dia menus now based on GtkAction framework.
* A number of new keyboard shortcuts.
* Layer visibility is now undoable.
* New sheets for Business Process Modelling
* The initial diagram will now be filled with opened diagram if
unchanged, like Gnumeric.
* Pasted objects now no longer land on top of each other.
* A number of smaller bugs have been fixed and improvements made, see
details in ChangeLog.
dia-0.95-1: 25-May-2006
* Fix of bug #339562 (page margins restriction), #338336 ("query" in
......
......@@ -34,6 +34,12 @@ dia_embedd =
dia_oafinfo =
endif
if WITH_FREETYPE
freetype_files = diapsft2renderer.h diapsft2renderer.c
else
freetype_files =
endif
bin_PROGRAMS = dia $(dia_embedd)
ICON_PNG_PAIRS= \
......@@ -190,8 +196,7 @@ dia_core_files = \
dynamic_refresh.c \
diapsrenderer.h \
diapsrenderer.c \
diapsft2renderer.h \
diapsft2renderer.c \
$(freetype_files) \
navigation.h \
navigation.c \
diacanvas.c \
......
......@@ -289,14 +289,17 @@ set_font(DiaRenderer *self, DiaFont *font, real height)
gchar h_buf[DTOSTR_BUF_SIZE];
if (font != self->font || height != self->font_height) {
DiaFont *old_font;
fprintf(renderer->file, "/%s-latin1 ff %s scf sf\n",
dia_font_get_psfontname(font),
psrenderer_dtostr(h_buf, (gdouble) height*0.7) );
if (self->font != NULL) {
dia_font_unref(self->font);
}
old_font = self->font;
self->font = font;
dia_font_ref(self->font);
if (old_font != NULL) {
dia_font_unref(old_font);
}
self->font_height = height;
}
}
......@@ -715,6 +718,7 @@ draw_text_line(DiaRenderer *self,
real width;
gchar *text = text_line_get_string(text_line);
int n_chars = g_utf8_strlen(text, -1);
real adjust;
if (1 > n_chars)
return;
......@@ -729,9 +733,11 @@ draw_text_line(DiaRenderer *self,
fprintf(renderer->file, "(%s) ", buffer);
g_free(buffer);
adjust = text_line_get_descent(text_line);
fprintf(renderer->file, "%s %s m \n",
psrenderer_dtostr(px_buf, pos->x),
psrenderer_dtostr(py_buf, pos->y) );
psrenderer_dtostr(py_buf, pos->y - adjust) );
/* Perform magic to ensure the right size */
width = text_line_get_width(text_line);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment