[gcompris] removed the use of the URW font.



commit d2b9893f841ac9e1a877cd4a91b9fc694c904867
Author: Bruno Coudoin <bruno coudoin free fr>
Date:   Fri Oct 5 23:33:50 2012 +0200

    removed the use of the URW font.
    
    In some activities, the URW font was referenced. This font is
    not available on all platform so it is better not to use it.
    
    Also it is best to use the get_font from our skin system.
    This way users may customize GCompris to use specialized font in
    a single location.

 src/explore-activity/explore.py                    |    6 +++---
 src/piano_composition-activity/gcomprismusic.py    |    3 ++-
 .../piano_composition.py                           |    7 ++++---
 3 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/src/explore-activity/explore.py b/src/explore-activity/explore.py
index 2c5ac61..6d43c4c 100644
--- a/src/explore-activity/explore.py
+++ b/src/explore-activity/explore.py
@@ -149,7 +149,7 @@ dialogue to\nenable the sound."), None)
                             parent=self.rootitem,
                             pixbuf=gcompris.utils.load_pixmap('explore/playbutton.png'),
                             x=65,
-                            y=100,
+                            y=110,
                             )
                     self.playButton.connect("button_press_event", self.playCurrentMusicSelection)
                     self.writeText(_('Click to play sound'), 100, 70)
@@ -182,8 +182,8 @@ dialogue to\nenable the sound."), None)
           x=x,
           y=y,
           width=width,
-          text='<span font_family="URW Gothic L" size="medium" \
-          weight="bold" style="italic">' + txt + '</span>',
+          font = gcompris.skin.get_font("gcompris/board/medium"),
+          text = txt,
           anchor=gtk.ANCHOR_CENTER,
           alignment=pango.ALIGN_CENTER,
           use_markup=True
diff --git a/src/piano_composition-activity/gcomprismusic.py b/src/piano_composition-activity/gcomprismusic.py
index 876a857..5daf0c4 100644
--- a/src/piano_composition-activity/gcomprismusic.py
+++ b/src/piano_composition-activity/gcomprismusic.py
@@ -1245,7 +1245,8 @@ class PianoKeyboard():
          x=x + offset,
          y=y + 18,
          width=10,
-         text='<span font_family="URW Gothic L" size="' + size + '" weight="bold">' + getKeyNameFromID(numID, self.sharpNotation) + '</span>',
+         font = gcompris.skin.get_font("gcompris/board/small"),
+         text = getKeyNameFromID(numID, self.sharpNotation),
          fill_color="black",
          anchor=gtk.ANCHOR_CENTER,
          alignment=pango.ALIGN_CENTER,
diff --git a/src/piano_composition-activity/piano_composition.py b/src/piano_composition-activity/piano_composition.py
index 68c4849..7b13cb4 100644
--- a/src/piano_composition-activity/piano_composition.py
+++ b/src/piano_composition-activity/piano_composition.py
@@ -425,7 +425,8 @@ dialogue to\nenable the sound."), None)
             self.text = goocanvas.Text(
                 parent=newRoot,
                 x=x, y=y,
-                text='<span size="13000"> ' + self.data.get(section, 'title') + '</span>',
+                font = gcompris.skin.get_font("gcompris/board/small"),
+                text= self.data.get(section, 'title'),
                 fill_color="black",
                 use_markup=True
                 )
@@ -434,8 +435,8 @@ dialogue to\nenable the sound."), None)
                  x=x + 30,
                  y=y + 18,
                  width=250,
-                 text='<span font_family="URW Gothic L" size="10000" \
-                 weight="bold">' + _(self.data.get(section, '_origin')) + '</span>',
+                 font = gcompris.skin.get_font("gcompris/board/tiny"),
+                 text= _(self.data.get(section, '_origin')),
                  fill_color="black",
                  use_markup=True
                  )



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]