]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2010-02-16 Vladimir Serbinenko <phcoder@gmail.com>
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Tue, 16 Feb 2010 12:23:08 +0000 (13:23 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Tue, 16 Feb 2010 12:23:08 +0000 (13:23 +0100)
Remove any reference to non-free fonts.

* commands/videotest.c (grub_cmd_videotest): Use unifont by default.
* docs/gfxmenu-theme-example.txt: Removed. It's both outdated and
uses non-free components.
* font/font.c (grub_font_get_name): Remove example name.
* gfxmenu/gui_label.c (grub_gui_label_new): Use unifont by default.
* gfxmenu/gui_list.c (grub_gui_list_new): Likewise.
* gfxmenu/gui_progress_bar.c (grub_gui_progress_bar_new): Likewise.
* gfxmenu/view.c (grub_gfxmenu_view_new): Likewise.

ChangeLog
commands/videotest.c
docs/gfxmenu-theme-example.txt [deleted file]
font/font.c
gfxmenu/gui_label.c
gfxmenu/gui_list.c
gfxmenu/gui_progress_bar.c
gfxmenu/view.c

index d6925f0ddef1099672f4625a44e47c3358105a20..1817ad7321834ba633481c566bbaad7c2f018997 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2010-02-16  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       Remove any reference to non-free fonts.
+
+       * commands/videotest.c (grub_cmd_videotest): Use unifont by default.
+       * docs/gfxmenu-theme-example.txt: Removed. It's both outdated and
+       uses non-free components.
+       * font/font.c (grub_font_get_name): Remove example name.
+       * gfxmenu/gui_label.c (grub_gui_label_new): Use unifont by default.
+       * gfxmenu/gui_list.c (grub_gui_list_new): Likewise.
+       * gfxmenu/gui_progress_bar.c (grub_gui_progress_bar_new): Likewise.
+       * gfxmenu/view.c (grub_gfxmenu_view_new): Likewise.
+
 2010-02-16  Georgy Buranov <gburanov@gmail.com>
 
        * disk/efi/efidisk.c (grub_efidisk_get_device_name): Fix a typo.
index 1730a203119826cc6427c9776622ea17ff3f1d39..390811a71cfe7df38adcb5016a9aa97aa8290dc9 100644 (file)
@@ -69,9 +69,9 @@ grub_cmd_videotest (grub_command_t cmd __attribute__ ((unused)),
   color = grub_video_map_rgb (0, 255, 255);
   grub_video_fill_rect (color, 100, 100, 100, 100);
 
-  sansbig = grub_font_get ("Helvetica Bold 24");
-  sans = grub_font_get ("Helvetica Bold 14");
-  sanssmall = grub_font_get ("Helvetica 8");
+  sansbig = grub_font_get ("Unknown Regular 16");
+  sans = grub_font_get ("Unknown Regular 16");
+  sanssmall = grub_font_get ("Unknown Regular 16");
   fixed = grub_font_get ("Fixed 20");
   if (! sansbig || ! sans || ! sanssmall || ! fixed)
     return grub_error (GRUB_ERR_BAD_FONT, "no font loaded");
@@ -126,11 +126,6 @@ grub_cmd_videotest (grub_command_t cmd __attribute__ ((unused)),
   grub_font_draw_string (str, fixed, color, 16, texty);
   texty += grub_font_get_descent (fixed) + grub_font_get_leading (fixed);
 
-  /* Some character don't exist in the Helvetica font, so the font engine
-     will fall back to using glyphs from another font that does contain them.
-     TODO The font engine should be smart about selecting a replacement font
-     and prioritize fonts with similar sizes.  */
-
   texty += grub_font_get_ascent(sansbig);
   grub_font_draw_string (str, sansbig, color, 16, texty);
   texty += grub_font_get_descent (sansbig) + grub_font_get_leading (sansbig);
diff --git a/docs/gfxmenu-theme-example.txt b/docs/gfxmenu-theme-example.txt
deleted file mode 100644 (file)
index 4363dc8..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-# GRUB gfxmenu theme "winter".
-# Uses background image from:
-# http://www.cyberpunkcafe.com/e107_plugins/autogallery/autogallery.php?show=1.Open%20Source%20Wallpaper
-# "without-leaves.png" was called "Without Leafs in Winter.png"
-
-lua-script: "winter.lua"
-title-text: ""
-title-font: "Helvetica Bold 18"
-status-font: "Helvetica 8"
-terminal-font: "Fixed 9"
-title-color: "40, 40, 40"
-status-color: "#FFF"
-status-bg-color: "0, 166, 183, 128"
-desktop-image: "without-leaves.png"
-desktop-color: "0, 154, 183"
-terminal-box: "terminal_*.png"
-
-+ boot_menu {
-   position = (120, 60)
-   preferred_size = (400, -1)
-   item_font = "Helvetica Bold 14"
-   selected_item_font = "Helvetica Bold 14"
-   item_color = "0, 0, 0"
-   selected_item_color = "203, 251, 255"
-   menu_pixmap_style = "menu_*.png"
-   selected_item_pixmap_style = "select_*.png"
-   icon_width = 44
-   icon_height = 44
-   item_height = 32
-   item_padding = 0
-   item_icon_space = 3
-   item_spacing = 11
-}
-
-# You can add text at arbitrary locations on the screen.
-# The specification within the "+label {...}" block is free-form,
-# so you can use as much or as little white space as you like.
-
-+ label {
-   position = (170, 50)
-   font = "smoothansi 13"
-   color = "0,0,128"
-   text = "This is the Winter theme ... brought to you by GRUB!"
-}
-
-# Show the text alignment supported by labels.
-+ vbox {
-   position = (220, 347)
-   preferred_size = (200, -1)     # A preferred size of -1 means automatic.
-   + label { text="Text alignment demo" align="center" font="aqui 11" }
-   + label { text="Left" align="left" font="cure 11" }
-   + label { text="Center" align="center" font="cure 11" }
-   + label { text="Right" align="right" font="cure 11" }
-}
-
-+ vbox {
-   position = (580, 10)
-   + label { text="GNU" font="gelly 11" color="0, 0, 0" }
-   + label { text="GRUB" font="aqui 11" color="0, 0, 0" }
-   + label { text="boot loader" font="cure 11" color="0, 0, 0" }
-}
-
-+ hbox {
-   position = (80, 10)
-   + label { text="GNU" font="gelly 11" color="0, 0, 0" }
-   + label { text="GRUB" font="aqui 11" color="0, 0, 0" }
-   + label { text="boot loader" font="cure 11" color="0, 0, 0" }
-}
-
-# Demonstration of a compound layout: boxes within boxes.
-+ hbox
-{
-   position = (480, 3)
-
-   + vbox
-   {
-      # Note: We can't just use 'size' to set the image's size,
-      #       since the vbox will resize the component according to its
-      #       preferred size, which for images is the native image size.
-
-      + image { file="/boot/grub/themes/icons/ubuntu.png"
-                preferred_size = (20, 20) }
-      + image { file="/boot/grub/themes/icons/gentoo.png"
-                preferred_size = (20, 20) }
-   }
-
-   + vbox
-   {
-      + label { text="GRand" font="cure 11" color=#99F }
-      + label { text="Unified" font="cure 11" color=#BBF }
-      + label { text="Bootloader" font="cure 11" color=#DDF }
-   }
-}
-
-# By defining a 'progress_bar' type component with an ID of '__timeout__',
-# the progress bar will be used to display the time remaining before an
-# the default entry is automatically booted.
-+ progress_bar
-{
-   id = "__timeout__"
-   position = (80, 393)
-   preferred_size = (500, 24)
-   font = "cure 11"
-   text_color = #000
-   fg_color = #CCF
-   bg_color = #66B
-   border_color = #006
-   show_text = false
-}
-
-# Although the progress_bar component is normally used to indicate the
-# time remaining, it's also possible to create other components with an ID
-# of '__timeout__'.  All components with and ID of 'timeout_bar' will have
-# the following properties set based on the timeout value:
-#   text, value, start, end, visible.
-# In this case, we have set 'show_text=false' on the progress bar, and use
-# the following label's 'text' property to display the message.
-+ label
-{
-   id = "__timeout__"
-   position = (80, 420)
-   preferred_size = (500, 24)
-   font = "lime 11"
-   color = #117
-   align = "center"
-}
-
-
index 16f2ed35bf04cc8781307bc1b0595ef1d8ac08a0..1b3dc6387fbe2997f64dffc911c3c09587e24454 100644 (file)
@@ -862,7 +862,7 @@ grub_font_get (const char *font_name)
     return &null_font;
 }
 
-/* Get the full name of the font.  For instance, "Helvetica Bold 12".  */
+/* Get the full name of the font.  */
 const char *
 grub_font_get_name (grub_font_t font)
 {
index b2835ea1ab7d737085a12dc64f4598899b196795..a9dd575ac9506ac3b6d837e2783064e8cbdad582 100644 (file)
@@ -216,7 +216,7 @@ grub_gui_label_new (void)
   label->comp.ops = &label_ops;
   label->visible = 1;
   label->text = grub_strdup ("");
-  label->font = grub_font_get ("Helvetica 10");
+  label->font = grub_font_get ("Unknown Regular 16");
   label->color.red = 0;
   label->color.green = 0;
   label->color.blue = 0;
index a78339385293e3b1b494c1990be493db0f067560..0d771413f9fbb32490549e942d43c0a482f0283a 100644 (file)
@@ -566,7 +566,7 @@ grub_gui_list_new (void)
 
   self->visible = 1;
 
-  default_font = grub_font_get ("Helvetica 12");
+  default_font = grub_font_get ("Unknown Regular 16");
   default_fg_color = grub_gui_color_rgb (0, 0, 0);
   default_bg_color = grub_gui_color_rgb (255, 255, 255);
 
index 4fda61d49f057a3146355545833f6feb5fe32b10..d786aae31a77d5048c9240e5e9f7315a2634f045 100644 (file)
@@ -371,7 +371,7 @@ grub_gui_progress_bar_new (void)
   self->progress.ops = &progress_bar_pb_ops;
   self->progress.component.ops = &progress_bar_ops;
   self->visible = 1;
-  self->font = grub_font_get ("Helvetica 10");
+  self->font = grub_font_get ("Unknown Regular 16");
   grub_gui_color_t black = { .red = 0, .green = 0, .blue = 0, .alpha = 255 };
   grub_gui_color_t gray = { .red = 128, .green = 128, .blue = 128, .alpha = 255 };
   grub_gui_color_t lightgray = { .red = 200, .green = 200, .blue = 200, .alpha = 255 };
index 611c01e1b70267f04805ef75b02157c9f773143c..bf637a96d9839d3efc65e10f6266cb12434346b2 100644 (file)
@@ -66,7 +66,7 @@ grub_gfxmenu_view_new (const char *theme_path,
   view->screen.width = width;
   view->screen.height = height;
 
-  default_font = grub_font_get ("Helvetica 12");
+  default_font = grub_font_get ("Unknown Regular 16");
   default_fg_color = grub_gui_color_rgb (0, 0, 0);
   default_bg_color = grub_gui_color_rgb (255, 255, 255);