* [PATCH] look for DejaVu also in /usr/share/fonts/truetype
@ 2014-01-12 12:15 Andrey Borzenkov
2014-01-18 15:58 ` [PATCH] Improve DejaVuSans detection Andrey Borzenkov
2014-01-21 7:29 ` [PATCH] look for DejaVu also in /usr/share/fonts/truetype Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 2 replies; 11+ messages in thread
From: Andrey Borzenkov @ 2014-01-12 12:15 UTC (permalink / raw)
To: grub-devel
It is installed in this path on openSUSE.
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 7c5d080..e80c074 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1375,7 +1375,7 @@ fi
if test x"$starfield_excuse" = x; then
for ext in pcf pcf.gz bdf bdf.gz ttf ttf.gz; do
- for dir in . /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/truetype/ttf-dejavu /usr/share/fonts/dejavu; do
+ for dir in . /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/truetype/ttf-dejavu /usr/share/fonts/dejavu /usr/share/fonts/truetype; do
if test -f "$dir/DejaVuSans.$ext"; then
DJVU_FONT_SOURCE="$dir/DejaVuSans.$ext"
break 2
--
tg: (0776112..) u/dejavu-path (depends on: master)
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH] Improve DejaVuSans detection
2014-01-12 12:15 [PATCH] look for DejaVu also in /usr/share/fonts/truetype Andrey Borzenkov
@ 2014-01-18 15:58 ` Andrey Borzenkov
2014-01-18 16:26 ` Vladimir 'φ-coder/phcoder' Serbinenko
2014-01-21 7:46 ` Vladimir 'φ-coder/phcoder' Serbinenko
2014-01-21 7:29 ` [PATCH] look for DejaVu also in /usr/share/fonts/truetype Vladimir 'φ-coder/phcoder' Serbinenko
1 sibling, 2 replies; 11+ messages in thread
From: Andrey Borzenkov @ 2014-01-18 15:58 UTC (permalink / raw)
To: grub-devel
Look also in /usr/share/fonts/truetype, it is installed in this path on
openSUSE.
Prefer DejaVuSansMono if found, on openSUSE DejaVuSans is proportional font.
Add detected path name to summary output.
---
configure.ac | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/configure.ac b/configure.ac
index 2e4cf3c..98f6012 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1378,11 +1378,13 @@ fi
if test x"$starfield_excuse" = x; then
for ext in pcf pcf.gz bdf bdf.gz ttf ttf.gz; do
- for dir in . /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/truetype/ttf-dejavu /usr/share/fonts/dejavu; do
- if test -f "$dir/DejaVuSans.$ext"; then
- DJVU_FONT_SOURCE="$dir/DejaVuSans.$ext"
- break 2
- fi
+ for dir in . /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/truetype/ttf-dejavu /usr/share/fonts/dejavu /usr/share/fonts/truetype; do
+ for font in DejaVuSansMono DejaVuSans; do
+ if test -f "$dir/$font.$ext"; then
+ DJVU_FONT_SOURCE="$dir/$font.$ext"
+ break 2
+ fi
+ done
done
done
@@ -1805,6 +1807,7 @@ echo grub-mount: No "($grub_mount_excuse)"
fi
if [ x"$starfield_excuse" = x ]; then
echo starfield theme: Yes
+echo With DejaVuSans font from $DJVU_FONT_SOURCE
else
echo starfield theme: No "($starfield_excuse)"
fi
--
tg: (dcecae1..) u/dejavu-path (depends on: master)
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] Improve DejaVuSans detection
2014-01-18 15:58 ` [PATCH] Improve DejaVuSans detection Andrey Borzenkov
@ 2014-01-18 16:26 ` Vladimir 'φ-coder/phcoder' Serbinenko
2014-01-18 17:04 ` Andrey Borzenkov
2014-01-21 7:46 ` Vladimir 'φ-coder/phcoder' Serbinenko
1 sibling, 1 reply; 11+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2014-01-18 16:26 UTC (permalink / raw)
To: The development of GNU GRUB
[-- Attachment #1: Type: text/plain, Size: 1676 bytes --]
On 18.01.2014 16:58, Andrey Borzenkov wrote:
> Look also in /usr/share/fonts/truetype, it is installed in this path on
> openSUSE.
>
> Prefer DejaVuSansMono if found, on openSUSE DejaVuSans is proportional font.
>
It's not right solution. Proportional fonts must be preffered for
themes. Only terminal requires monospace fonts. You need to set
gfxterm_font to unifont name.
> Add detected path name to summary output.
>
> ---
> configure.ac | 13 ++++++++-----
> 1 file changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 2e4cf3c..98f6012 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1378,11 +1378,13 @@ fi
>
> if test x"$starfield_excuse" = x; then
> for ext in pcf pcf.gz bdf bdf.gz ttf ttf.gz; do
> - for dir in . /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/truetype/ttf-dejavu /usr/share/fonts/dejavu; do
> - if test -f "$dir/DejaVuSans.$ext"; then
> - DJVU_FONT_SOURCE="$dir/DejaVuSans.$ext"
> - break 2
> - fi
> + for dir in . /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/truetype/ttf-dejavu /usr/share/fonts/dejavu /usr/share/fonts/truetype; do
> + for font in DejaVuSansMono DejaVuSans; do
> + if test -f "$dir/$font.$ext"; then
> + DJVU_FONT_SOURCE="$dir/$font.$ext"
> + break 2
> + fi
> + done
> done
> done
>
> @@ -1805,6 +1807,7 @@ echo grub-mount: No "($grub_mount_excuse)"
> fi
> if [ x"$starfield_excuse" = x ]; then
> echo starfield theme: Yes
> +echo With DejaVuSans font from $DJVU_FONT_SOURCE
> else
> echo starfield theme: No "($starfield_excuse)"
> fi
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 274 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Improve DejaVuSans detection
2014-01-18 16:26 ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2014-01-18 17:04 ` Andrey Borzenkov
2014-01-21 7:40 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 1 reply; 11+ messages in thread
From: Andrey Borzenkov @ 2014-01-18 17:04 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 2547 bytes --]
В Sat, 18 Jan 2014 17:26:16 +0100
Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com> пишет:
> On 18.01.2014 16:58, Andrey Borzenkov wrote:
> > Look also in /usr/share/fonts/truetype, it is installed in this path on
> > openSUSE.
> >
> > Prefer DejaVuSansMono if found, on openSUSE DejaVuSans is proportional font.
> >
> It's not right solution. Proportional fonts must be preffered for
> themes. Only terminal requires monospace fonts. You need to set
> gfxterm_font to unifont name.
But then not gfxterm_font, but we need to set it in theme definition.
gfxterm_font is optional and theme must still work without it.
From: Andrey Borzenkov <arvidjaar@gmail.com>
Subject: [PATCH] Improve DejaVuSans detection and fix starfield terminal font
Look also in /usr/share/fonts/truetype, it is installed in this path on
openSUSE.
Add detected path name to summary output.
Set terminal font to unifont in starfield; DejaVuSans is proportional and looks
bad in terminal window.
---
configure.ac | 3 ++-
themes/starfield/theme.txt | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index cf3de3b..8888c2f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1389,7 +1389,7 @@ fi
if test x"$starfield_excuse" = x; then
for ext in pcf pcf.gz bdf bdf.gz ttf ttf.gz; do
- for dir in . /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/truetype/ttf-dejavu /usr/share/fonts/dejavu; do
+ for dir in . /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/truetype/ttf-dejavu /usr/share/fonts/dejavu /usr/share/fonts/truetype; do
if test -f "$dir/DejaVuSans.$ext"; then
DJVU_FONT_SOURCE="$dir/DejaVuSans.$ext"
break 2
@@ -1816,6 +1816,7 @@ echo grub-mount: No "($grub_mount_excuse)"
fi
if [ x"$starfield_excuse" = x ]; then
echo starfield theme: Yes
+echo With DejaVuSans font from $DJVU_FONT_SOURCE
else
echo starfield theme: No "($starfield_excuse)"
fi
diff --git a/themes/starfield/theme.txt b/themes/starfield/theme.txt
index 5ec871b..b3b8d85 100644
--- a/themes/starfield/theme.txt
+++ b/themes/starfield/theme.txt
@@ -25,7 +25,7 @@ message-font: "DejaVu Sans Regular 12"
message-color: "#000"
message-bg-color: "#fff"
terminal-box: "terminal_box_*.png"
-terminal-font: "DejaVu Sans Regular 12"
+terminal-font: "Gnu Unifont Mono Regular 16"
desktop-image: "starfield.png"
#help bar at the bottom
--
tg: (1ecf96f..) u/dejavu-path (depends on: master)
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] look for DejaVu also in /usr/share/fonts/truetype
2014-01-12 12:15 [PATCH] look for DejaVu also in /usr/share/fonts/truetype Andrey Borzenkov
2014-01-18 15:58 ` [PATCH] Improve DejaVuSans detection Andrey Borzenkov
@ 2014-01-21 7:29 ` Vladimir 'φ-coder/phcoder' Serbinenko
1 sibling, 0 replies; 11+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2014-01-21 7:29 UTC (permalink / raw)
To: The development of GNU GRUB
[-- Attachment #1: Type: text/plain, Size: 848 bytes --]
Go ahead
On 12.01.2014 13:15, Andrey Borzenkov wrote:
> It is installed in this path on openSUSE.
>
> ---
> configure.ac | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/configure.ac b/configure.ac
> index 7c5d080..e80c074 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1375,7 +1375,7 @@ fi
>
> if test x"$starfield_excuse" = x; then
> for ext in pcf pcf.gz bdf bdf.gz ttf ttf.gz; do
> - for dir in . /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/truetype/ttf-dejavu /usr/share/fonts/dejavu; do
> + for dir in . /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/truetype/ttf-dejavu /usr/share/fonts/dejavu /usr/share/fonts/truetype; do
> if test -f "$dir/DejaVuSans.$ext"; then
> DJVU_FONT_SOURCE="$dir/DejaVuSans.$ext"
> break 2
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 274 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Improve DejaVuSans detection
2014-01-18 17:04 ` Andrey Borzenkov
@ 2014-01-21 7:40 ` Vladimir 'φ-coder/phcoder' Serbinenko
2014-01-21 16:18 ` Andrey Borzenkov
0 siblings, 1 reply; 11+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2014-01-21 7:40 UTC (permalink / raw)
To: The development of GNU GRUB
[-- Attachment #1: Type: text/plain, Size: 3079 bytes --]
On 18.01.2014 18:04, Andrey Borzenkov wrote:
> В Sat, 18 Jan 2014 17:26:16 +0100
> Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com> пишет:
>
>> On 18.01.2014 16:58, Andrey Borzenkov wrote:
>>> Look also in /usr/share/fonts/truetype, it is installed in this path on
>>> openSUSE.
>>>
>>> Prefer DejaVuSansMono if found, on openSUSE DejaVuSans is proportional font.
>>>
>> It's not right solution. Proportional fonts must be preffered for
>> themes. Only terminal requires monospace fonts. You need to set
>> gfxterm_font to unifont name.
>
> But then not gfxterm_font, but we need to set it in theme definition.
> gfxterm_font is optional and theme must still work without it.
>
> From: Andrey Borzenkov <arvidjaar@gmail.com>
> Subject: [PATCH] Improve DejaVuSans detection and fix starfield terminal font
>
> Look also in /usr/share/fonts/truetype, it is installed in this path on
> openSUSE.
>
> Add detected path name to summary output.
>
> Set terminal font to unifont in starfield; DejaVuSans is proportional and looks
> bad in terminal window.
>
I've misread the patch in my first review. I thought it added a new
behaviour of looking for DejaVuSans.
> ---
> configure.ac | 3 ++-
> themes/starfield/theme.txt | 2 +-
> 2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index cf3de3b..8888c2f 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1389,7 +1389,7 @@ fi
>
> if test x"$starfield_excuse" = x; then
> for ext in pcf pcf.gz bdf bdf.gz ttf ttf.gz; do
> - for dir in . /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/truetype/ttf-dejavu /usr/share/fonts/dejavu; do
> + for dir in . /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/truetype/ttf-dejavu /usr/share/fonts/dejavu /usr/share/fonts/truetype; do
Go ahead for this part.
> if test -f "$dir/DejaVuSans.$ext"; then
> DJVU_FONT_SOURCE="$dir/DejaVuSans.$ext"
> break 2
> @@ -1816,6 +1816,7 @@ echo grub-mount: No "($grub_mount_excuse)"
> fi
> if [ x"$starfield_excuse" = x ]; then
> echo starfield theme: Yes
> +echo With DejaVuSans font from $DJVU_FONT_SOURCE
Go ahead for this as well.
> else
> echo starfield theme: No "($starfield_excuse)"
> fi
> diff --git a/themes/starfield/theme.txt b/themes/starfield/theme.txt
> index 5ec871b..b3b8d85 100644
> --- a/themes/starfield/theme.txt
> +++ b/themes/starfield/theme.txt
> @@ -25,7 +25,7 @@ message-font: "DejaVu Sans Regular 12"
> message-color: "#000"
> message-bg-color: "#fff"
> terminal-box: "terminal_box_*.png"
> -terminal-font: "DejaVu Sans Regular 12"
> +terminal-font: "Gnu Unifont Mono Regular 16"
> desktop-image: "starfield.png"
>
On my system I get name "Unifont Regular 16". Did you check unicode.pf2
to get this string?
> #help bar at the bottom
>
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 274 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Improve DejaVuSans detection
2014-01-18 15:58 ` [PATCH] Improve DejaVuSans detection Andrey Borzenkov
2014-01-18 16:26 ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2014-01-21 7:46 ` Vladimir 'φ-coder/phcoder' Serbinenko
2014-01-21 16:16 ` Andrey Borzenkov
1 sibling, 1 reply; 11+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2014-01-21 7:46 UTC (permalink / raw)
To: The development of GNU GRUB
[-- Attachment #1: Type: text/plain, Size: 1733 bytes --]
On 18.01.2014 16:58, Andrey Borzenkov wrote:
> Look also in /usr/share/fonts/truetype, it is installed in this path on
> openSUSE.
>
> Prefer DejaVuSansMono if found, on openSUSE DejaVuSans is proportional font.
>
> Add detected path name to summary output.
>
> ---
> configure.ac | 13 ++++++++-----
> 1 file changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 2e4cf3c..98f6012 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1378,11 +1378,13 @@ fi
>
> if test x"$starfield_excuse" = x; then
> for ext in pcf pcf.gz bdf bdf.gz ttf ttf.gz; do
> - for dir in . /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/truetype/ttf-dejavu /usr/share/fonts/dejavu; do
> - if test -f "$dir/DejaVuSans.$ext"; then
> - DJVU_FONT_SOURCE="$dir/DejaVuSans.$ext"
> - break 2
> - fi
> + for dir in . /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/truetype/ttf-dejavu /usr/share/fonts/dejavu /usr/share/fonts/truetype; do
> + for font in DejaVuSansMono DejaVuSans; do
> + if test -f "$dir/$font.$ext"; then
> + DJVU_FONT_SOURCE="$dir/$font.$ext"
> + break 2
> + fi
> + done
It's fine to use SansMono for terminal (I'd prefer unifont though) but
this change also changes the way various items in menu are displayed.
Monospace fonts are less dense so allow less info in menu on small screens.
> done
> done
>
> @@ -1805,6 +1807,7 @@ echo grub-mount: No "($grub_mount_excuse)"
> fi
> if [ x"$starfield_excuse" = x ]; then
> echo starfield theme: Yes
> +echo With DejaVuSans font from $DJVU_FONT_SOURCE
> else
> echo starfield theme: No "($starfield_excuse)"
> fi
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 274 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Improve DejaVuSans detection
2014-01-21 7:46 ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2014-01-21 16:16 ` Andrey Borzenkov
2014-01-21 23:16 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 1 reply; 11+ messages in thread
From: Andrey Borzenkov @ 2014-01-21 16:16 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 2226 bytes --]
В Tue, 21 Jan 2014 08:46:41 +0100
Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com> пишет:
> > Prefer DejaVuSansMono if found, on openSUSE DejaVuSans is proportional font.
> >
> It's fine to use SansMono for terminal (I'd prefer unifont though) but
> this change also changes the way various items in menu are displayed.
> Monospace fonts are less dense so allow less info in menu on small screens.
Yes, I realized that. The problem is, unifont may be missing (user is
free to override it with GRUB_FONT) and theme must be self-consistent
(which is also why my other attempt to set font to Unifont is not quite
correct as well). I tried to build fixed width DejaVuSansMono, but I do
not like results enough. First, it results in extremely large vertical
size using standard parameters; e.g.
bor@opensuse:~/build/grub> ./build-grub-mkfont -o /tmp/foo.pf2 -v -s 12 /usr/share/fonts/truetype/DejaVuSansMono.ttf
Unknown gsub font feature 0x63636d70 (ccmp)
Unknown gsub font feature 0x646c6967 (dlig)
Unsupported substitution flag: 0x9
Unsupported substitution flag: 0x9
Unknown gsub font feature 0x6c6f636c (locl)
Unknown gsub font feature 0x6c6f636c (locl)
Unsupported substitution flag: 0x9
Font name: DejaVu Sans Mono Regular 12
Max width: 11
Max height: 22
Font ascent: 14
Font descent: 4
Number of glyph: 3388
22 height for font size 12! Forcing hinting gives something more close
to reality
bor@opensuse:~/build/grub> ./build-grub-mkfont -o /tmp/foo.pf2 -v -s 12 -a /usr/share/fonts/truetype/DejaVuSansMono.ttf
Unknown gsub font feature 0x63636d70 (ccmp)
Unknown gsub font feature 0x646c6967 (dlig)
Unsupported substitution flag: 0x9
Unsupported substitution flag: 0x9
Unknown gsub font feature 0x6c6f636c (locl)
Unknown gsub font feature 0x6c6f636c (locl)
Unsupported substitution flag: 0x9
Font name: DejaVu Sans Mono Regular 12
Max width: 11
Max height: 16
Font ascent: 13
Font descent: 5
Number of glyph: 3388
But still too high so vertical lines look dashed.
May be the simplest solution would be to follow the same logic as
gfxterm - unless terminal-font is explicitly set, use $gfxterm_font by
default with fallback to first loaded font.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Improve DejaVuSans detection
2014-01-21 7:40 ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2014-01-21 16:18 ` Andrey Borzenkov
0 siblings, 0 replies; 11+ messages in thread
From: Andrey Borzenkov @ 2014-01-21 16:18 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 949 bytes --]
В Tue, 21 Jan 2014 08:40:39 +0100
Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com> пишет:
> > --- a/themes/starfield/theme.txt
> > +++ b/themes/starfield/theme.txt
> > @@ -25,7 +25,7 @@ message-font: "DejaVu Sans Regular 12"
> > message-color: "#000"
> > message-bg-color: "#fff"
> > terminal-box: "terminal_box_*.png"
> > -terminal-font: "DejaVu Sans Regular 12"
> > +terminal-font: "Gnu Unifont Mono Regular 16"
> > desktop-image: "starfield.png"
> >
> On my system I get name "Unifont Regular 16". Did you check unicode.pf2
> to get this string?
Of course.
bor@opensuse:~/build/grub> ./build-grub-mkfont -o /tmp/foo.pf2 -v /usr/share/fonts/uni/unifont.pcf.gz
Font name: Gnu Unifont Mono Regular 16
Max width: 16
Max height: 16
Font ascent: 14
Font descent: 2
Number of glyph: 34813
But as I said in another mail, this is not quite correct also as we are
not guaranteed to have it available.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Improve DejaVuSans detection
2014-01-21 16:16 ` Andrey Borzenkov
@ 2014-01-21 23:16 ` Vladimir 'φ-coder/phcoder' Serbinenko
2014-01-25 20:05 ` Andrey Borzenkov
0 siblings, 1 reply; 11+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2014-01-21 23:16 UTC (permalink / raw)
To: The development of GNU GRUB
[-- Attachment #1: Type: text/plain, Size: 265 bytes --]
On 21.01.2014 17:16, Andrey Borzenkov wrote:
> Yes, I realized that. The problem is, unifont may be missing (user is
> free to override it with GRUB_FONT)
If user overrides our fonts and gets ugly display it's his fault. You
can assume unifont availability.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 274 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Improve DejaVuSans detection
2014-01-21 23:16 ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2014-01-25 20:05 ` Andrey Borzenkov
0 siblings, 0 replies; 11+ messages in thread
From: Andrey Borzenkov @ 2014-01-25 20:05 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 2836 bytes --]
В Wed, 22 Jan 2014 00:16:44 +0100
Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com> пишет:
> On 21.01.2014 17:16, Andrey Borzenkov wrote:
> > Yes, I realized that. The problem is, unifont may be missing (user is
> > free to override it with GRUB_FONT)
> If user overrides our fonts and gets ugly display it's his fault. You
> can assume unifont availability.
>
Yes, but as we have just seen I cannot be sure about font *name*. The
patch below makes it return the very first loaded font which in normal
case is Unifont. So removing explicit font from starfield will result in
loading unifont but won't depend on particular font name.
From: Andrey Borzenkov <arvidjaar@gmail.com>
Subject: [PATCH] Do not set explicit font in starfield theme
DejaVuSans is proportional and looks bad in terminal window. DejaVuSansMono
also results in suboptimal display. Unifont is better but apparently font
name may be different on different distributions. So simply delete explicit
font name for terminal window; this will cause the very first font to be loaded
and normally the very first font is Unifont.
---
grub-core/font/font.c | 12 +++++++-----
themes/starfield/theme.txt | 1 -
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/grub-core/font/font.c b/grub-core/font/font.c
index 14b93e1..9e92e1f 100644
--- a/grub-core/font/font.c
+++ b/grub-core/font/font.c
@@ -861,18 +861,20 @@ grub_font_t
grub_font_get (const char *font_name)
{
struct grub_font_node *node;
+ struct grub_font_node *last_node = NULL;
- for (node = grub_font_list; node; node = node->next)
+ for (node = grub_font_list; node; last_node = node, node = node->next)
{
grub_font_t font = node->value;
if (grub_strcmp (font->name, font_name) == 0)
return font;
}
- /* If no font by that name is found, return the first font in the list
- as a fallback. */
- if (grub_font_list && grub_font_list->value)
- return grub_font_list->value;
+ /* If no font by that name is found, return the last font in the list
+ as a fallback. Last font is the one loaded first which is Unifont in
+ standard grub.cfg */
+ if (last_node && last_node->value)
+ return last_node->value;
else
/* The null_font is a last resort. */
return &null_font;
diff --git a/themes/starfield/theme.txt b/themes/starfield/theme.txt
index 5ec871b..cea799b 100644
--- a/themes/starfield/theme.txt
+++ b/themes/starfield/theme.txt
@@ -25,7 +25,6 @@ message-font: "DejaVu Sans Regular 12"
message-color: "#000"
message-bg-color: "#fff"
terminal-box: "terminal_box_*.png"
-terminal-font: "DejaVu Sans Regular 12"
desktop-image: "starfield.png"
#help bar at the bottom
--
tg: (5ae584c..) u/dejavu-path (depends on: master)
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply related [flat|nested] 11+ messages in thread
end of thread, other threads:[~2014-01-25 20:05 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-12 12:15 [PATCH] look for DejaVu also in /usr/share/fonts/truetype Andrey Borzenkov
2014-01-18 15:58 ` [PATCH] Improve DejaVuSans detection Andrey Borzenkov
2014-01-18 16:26 ` Vladimir 'φ-coder/phcoder' Serbinenko
2014-01-18 17:04 ` Andrey Borzenkov
2014-01-21 7:40 ` Vladimir 'φ-coder/phcoder' Serbinenko
2014-01-21 16:18 ` Andrey Borzenkov
2014-01-21 7:46 ` Vladimir 'φ-coder/phcoder' Serbinenko
2014-01-21 16:16 ` Andrey Borzenkov
2014-01-21 23:16 ` Vladimir 'φ-coder/phcoder' Serbinenko
2014-01-25 20:05 ` Andrey Borzenkov
2014-01-21 7:29 ` [PATCH] look for DejaVu also in /usr/share/fonts/truetype Vladimir 'φ-coder/phcoder' Serbinenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).