[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: gaf.git: branch: stable-1.6 updated (1.6.0-20091004-11-g037651c)
The branch, stable-1.6 has been updated
via 037651cdde1684c640d1339f699e1e45838e35e1 (commit)
via a78d166a1b57b80ff46e2ac98a14989b8af77c3e (commit)
from 9fb9761c0ae5b34670683de30f4251e24d55e652 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
gschem/src/gschem.c | 4 ++--
gschem/src/o_text.c | 7 +++----
2 files changed, 5 insertions(+), 6 deletions(-)
=================
Commit Messages
=================
commit 037651cdde1684c640d1339f699e1e45838e35e1
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>
gschem: Set font description explictly, rather than by parsing a string
This makes the font description string robust against numeric locale
settings, which could cause problems if "," gets used as the decimal
separator in the requested font size.
This issue caused text rendering to be broken in gschem on Win32 for
locales where "," was used as the decimal specifier. The underlying
bug (failing to override the LC_NUMERIC settings) is now fixed,
although it is just as well to be as robust as possible here.
Thanks to Cesar and Bert for testing this fix.
Tested-by: Cesar Strauss <cestrauss@xxxxxxxxx>
Tested-by: Bert Timmerman <bert.timmerman@xxxxxxxxx>
(cherry picked from commit 620ee00b6211b04c75e9cadffe5547ce4ed1ca8b)
:100644 100644 7d5b783... b766521... M gschem/src/o_text.c
commit a78d166a1b57b80ff46e2ac98a14989b8af77c3e
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>
Set the LC_NUMERIC locale to "C" rather than "POSIX"
This value is supported on Win32 platforms, whereas "POSIX" doesn't
appear to have any effect.
This is required in order to get correct postscript output in locales
where "," is used as the decimal point separator. It also affects the
font strings passed to Pango, causing broken text rendering in gschem.
Thanks to Cesar for testing this change indeed fixes the issue.
Tested-by: Cesar Strauss <cestrauss@xxxxxxxxx>
(cherry picked from commit 5d130060e694cfd3b3be177f1fae4a576728ff25)
:100644 100644 452ab4a... 303a2e3... M gschem/src/gschem.c
=========
Changes
=========
commit 037651cdde1684c640d1339f699e1e45838e35e1
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>
gschem: Set font description explictly, rather than by parsing a string
This makes the font description string robust against numeric locale
settings, which could cause problems if "," gets used as the decimal
separator in the requested font size.
This issue caused text rendering to be broken in gschem on Win32 for
locales where "," was used as the decimal specifier. The underlying
bug (failing to override the LC_NUMERIC settings) is now fixed,
although it is just as well to be as robust as possible here.
Thanks to Cesar and Bert for testing this fix.
Tested-by: Cesar Strauss <cestrauss@xxxxxxxxx>
Tested-by: Bert Timmerman <bert.timmerman@xxxxxxxxx>
(cherry picked from commit 620ee00b6211b04c75e9cadffe5547ce4ed1ca8b)
diff --git a/gschem/src/o_text.c b/gschem/src/o_text.c
index 7d5b783..b766521 100644
--- a/gschem/src/o_text.c
+++ b/gschem/src/o_text.c
@@ -159,7 +159,6 @@ static PangoFontMetrics *setup_pango_return_metrics (GSCHEM_TOPLEVEL *w_current,
PangoAttrList *attrs;
cairo_font_options_t *options;
double font_size_pt;
- char *font_string;
char *unescaped;
context = pango_layout_get_context (layout);
@@ -174,9 +173,9 @@ static PangoFontMetrics *setup_pango_return_metrics (GSCHEM_TOPLEVEL *w_current,
pango_cairo_context_set_resolution (context, 1000. * scale_factor);
font_size_pt = o_text_get_font_size_in_points (w_current->toplevel,
o_current);
- font_string = g_strdup_printf ("%s %f\n", FONT_NAME, font_size_pt);
- desc = pango_font_description_from_string (font_string);
- g_free (font_string);
+
+ desc = pango_font_description_from_string (FONT_NAME);
+ pango_font_description_set_size (desc, (double)PANGO_SCALE * font_size_pt);
pango_layout_set_font_description (layout, desc);
font_metrics = pango_context_get_metrics (context, desc, NULL);
commit a78d166a1b57b80ff46e2ac98a14989b8af77c3e
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>
Set the LC_NUMERIC locale to "C" rather than "POSIX"
This value is supported on Win32 platforms, whereas "POSIX" doesn't
appear to have any effect.
This is required in order to get correct postscript output in locales
where "," is used as the decimal point separator. It also affects the
font strings passed to Pango, causing broken text rendering in gschem.
Thanks to Cesar for testing this change indeed fixes the issue.
Tested-by: Cesar Strauss <cestrauss@xxxxxxxxx>
(cherry picked from commit 5d130060e694cfd3b3be177f1fae4a576728ff25)
diff --git a/gschem/src/gschem.c b/gschem/src/gschem.c
index 452ab4a..303a2e3 100644
--- a/gschem/src/gschem.c
+++ b/gschem/src/gschem.c
@@ -145,7 +145,7 @@ void main_prog(void *closure, int argc, char *argv[])
gtk_set_locale();
/* This must be the same for all locales */
- setlocale(LC_NUMERIC, "POSIX");
+ setlocale(LC_NUMERIC, "C");
/* Disable gtk's ability to set the locale. */
/* If gtk is allowed to set the locale, then it will override the */
@@ -345,7 +345,7 @@ int main (int argc, char *argv[])
#if ENABLE_NLS
setlocale(LC_ALL, "");
- setlocale(LC_NUMERIC, "POSIX");
+ setlocale(LC_NUMERIC, "C");
bindtextdomain("geda-gschem", LOCALEDIR);
textdomain("geda-gschem");
bind_textdomain_codeset("geda-gschem", "UTF-8");
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs