all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] gnu: emacs: Use libotf.
@ 2016-03-10 21:30 Roel Janssen
  2016-03-11 16:27 ` Ludovic Courtès
  0 siblings, 1 reply; 6+ messages in thread
From: Roel Janssen @ 2016-03-10 21:30 UTC (permalink / raw)
  To: guix-devel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0001-gnu-emacs-Use-libotf.patch --]
[-- Type: text/x-patch, Size: 992 bytes --]

From ae2b6e20acce65c6b281ae5a2670b0e3b8b81335 Mon Sep 17 00:00:00 2001
From: Roel Janssen <roel@gnu.org>
Date: Thu, 10 Mar 2016 22:21:23 +0100
Subject: [PATCH] gnu: emacs: Use libotf.

* gnu/packages/emacs.scm (emacs): Compile with libotf support.
---
 gnu/packages/emacs.scm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 7270fc4..7e2c289 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -38,6 +38,7 @@
   #:use-module (gnu packages guile)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages gnome)
+  #:use-module (gnu packages fontutils)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages tls)
@@ -127,6 +128,7 @@
        ("libtiff" ,libtiff)
        ("giflib" ,giflib)
        ("libjpeg" ,libjpeg-8)
+       ("libotf" ,libotf)
        ("acl" ,acl)
 
        ;; When looking for libpng `configure' links with `-lpng -lz', so we
-- 
2.5.0


[-- Attachment #2: Type: text/plain, Size: 362 bytes --]

Dear Guix,

The reason I packaged libotf a while ago was to use it in Emacs, in the
hope that I would be able to get better font rendering for otf fonts.

Here's a very small patch to compile Emacs with libotf support.
Unfortunately for me, it hasn't given me better font rendering.
Nevertheless, I hope it will be useful to someone.

Kind regards,
Roel Janssen

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] gnu: emacs: Use libotf.
  2016-03-10 21:30 [PATCH] gnu: emacs: Use libotf Roel Janssen
@ 2016-03-11 16:27 ` Ludovic Courtès
  2016-03-14 12:22   ` Roel Janssen
  0 siblings, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2016-03-11 16:27 UTC (permalink / raw)
  To: Roel Janssen; +Cc: guix-devel

Roel Janssen <roel@gnu.org> skribis:

> Here's a very small patch to compile Emacs with libotf support.
> Unfortunately for me, it hasn't given me better font rendering.

Does the resulting Emacs refer to libotf, as per:

  guix gc --references $(./pre-inst-env guix build emacs) | grep libotf

?

If it does, could you check how it’s supposed to use it?  I don’t see
how it would be used, but I guess this has nothing to do with rendering.

How “wrong” is font rendering for you?

Ludo’.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] gnu: emacs: Use libotf.
  2016-03-11 16:27 ` Ludovic Courtès
@ 2016-03-14 12:22   ` Roel Janssen
  2016-03-14 20:20     ` Alex Kost
  2016-03-15 16:01     ` Ludovic Courtès
  0 siblings, 2 replies; 6+ messages in thread
From: Roel Janssen @ 2016-03-14 12:22 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

[-- Attachment #1: emacs-from-guix.png --]
[-- Type: image/png, Size: 126444 bytes --]

[-- Attachment #2: emacs-from-fedora.png --]
[-- Type: image/png, Size: 126047 bytes --]

[-- Attachment #3: Type: text/plain, Size: 1272 bytes --]


Ludovic Courtès writes:

> Roel Janssen <roel@gnu.org> skribis:
>
>> Here's a very small patch to compile Emacs with libotf support.
>> Unfortunately for me, it hasn't given me better font rendering.
>
> Does the resulting Emacs refer to libotf, as per:
>
>   guix gc --references $(./pre-inst-env guix build emacs) | grep libotf
>
> ?

Yes, here's the output:
[roel@roel-tp guix]$ guix gc --references $(./pre-inst-env guix build emacs) | grep libotf
/gnu/store/kzc2zkdl3aadrs3iiml7vva80fgsd2b9-libotf-0.9.13

You can also see "Does Emacs use libotf?" turn to "yes" with my patch in
the overview at the end of the configure phase.

> If it does, could you check how it’s supposed to use it?  I don’t see
> how it would be used, but I guess this has nothing to do with rendering.

It seems that Emacs can use it for complex font rendering of OTF fonts:
https://www.gnu.org/software/emacs/manual/html_node/elisp/Low_002dLevel-Font.html

(search for "libotf").

> How “wrong” is font rendering for you?

I attached two screenshots, emacs-from-guix.png and
emacs-from-fedora.png.  Both are compiled with libotf support.  Besides
the missing Fira font, the text on the Emacs from Guix looks stretched
and not properly anti-aliased to me.

Kind regards,
Roel Janssen

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] gnu: emacs: Use libotf.
  2016-03-14 12:22   ` Roel Janssen
@ 2016-03-14 20:20     ` Alex Kost
  2016-03-15 16:08       ` Ludovic Courtès
  2016-03-15 16:01     ` Ludovic Courtès
  1 sibling, 1 reply; 6+ messages in thread
From: Alex Kost @ 2016-03-14 20:20 UTC (permalink / raw)
  To: Roel Janssen; +Cc: guix-devel

Roel Janssen (2016-03-14 15:22 +0300) wrote:

> I attached two screenshots, emacs-from-guix.png and
> emacs-from-fedora.png.  Both are compiled with libotf support.  Besides
> the missing Fira font, the text on the Emacs from Guix looks stretched
> and not properly anti-aliased to me.

For me, Emacs displays font properly (something similar to your
"emacs-from-fedora.png") even without libotf support.  Did you install
any ttf fonts in your user profile (like "font-dejavu" or
"font-liberation")?  After installing the fonts you can run "fc-cache
-fv", though it is probably not needed.

I use the following in my emacs config to set up the default font:

  (set-frame-font "Liberation Mono-12" nil t)

-- 
Alex

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] gnu: emacs: Use libotf.
  2016-03-14 12:22   ` Roel Janssen
  2016-03-14 20:20     ` Alex Kost
@ 2016-03-15 16:01     ` Ludovic Courtès
  1 sibling, 0 replies; 6+ messages in thread
From: Ludovic Courtès @ 2016-03-15 16:01 UTC (permalink / raw)
  To: Roel Janssen; +Cc: guix-devel

Roel Janssen <roel@gnu.org> skribis:

> Ludovic Courtès writes:
>
>> Roel Janssen <roel@gnu.org> skribis:
>>
>>> Here's a very small patch to compile Emacs with libotf support.
>>> Unfortunately for me, it hasn't given me better font rendering.
>>
>> Does the resulting Emacs refer to libotf, as per:
>>
>>   guix gc --references $(./pre-inst-env guix build emacs) | grep libotf
>>
>> ?
>
> Yes, here's the output:
> [roel@roel-tp guix]$ guix gc --references $(./pre-inst-env guix build emacs) | grep libotf
> /gnu/store/kzc2zkdl3aadrs3iiml7vva80fgsd2b9-libotf-0.9.13
>
> You can also see "Does Emacs use libotf?" turn to "yes" with my patch in
> the overview at the end of the configure phase.
>
>> If it does, could you check how it’s supposed to use it?  I don’t see
>> how it would be used, but I guess this has nothing to do with rendering.
>
> It seems that Emacs can use it for complex font rendering of OTF fonts:
> https://www.gnu.org/software/emacs/manual/html_node/elisp/Low_002dLevel-Font.html
>
> (search for "libotf").

Oh, interesting, glad to be proved wrong!  ;-)

Well that seems like a useful addition, so feel free to add it to
‘emacs’ (and to make sure it is removed from ‘emacs-no-x’.)

>> How “wrong” is font rendering for you?
>
> I attached two screenshots, emacs-from-guix.png and
> emacs-from-fedora.png.  Both are compiled with libotf support.  Besides
> the missing Fira font, the text on the Emacs from Guix looks stretched
> and not properly anti-aliased to me.

Right, but it’s a different font.  You’re probably right that something
is wrong, but it’s hard to tell with a different font.

Thanks!

Ludo’.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] gnu: emacs: Use libotf.
  2016-03-14 20:20     ` Alex Kost
@ 2016-03-15 16:08       ` Ludovic Courtès
  0 siblings, 0 replies; 6+ messages in thread
From: Ludovic Courtès @ 2016-03-15 16:08 UTC (permalink / raw)
  To: Alex Kost; +Cc: guix-devel

Alex Kost <alezost@gmail.com> skribis:

> Roel Janssen (2016-03-14 15:22 +0300) wrote:
>
>> I attached two screenshots, emacs-from-guix.png and
>> emacs-from-fedora.png.  Both are compiled with libotf support.  Besides
>> the missing Fira font, the text on the Emacs from Guix looks stretched
>> and not properly anti-aliased to me.
>
> For me, Emacs displays font properly (something similar to your
> "emacs-from-fedora.png") even without libotf support.  Did you install
> any ttf fonts in your user profile (like "font-dejavu" or
> "font-liberation")?  After installing the fonts you can run "fc-cache
> -fv", though it is probably not needed.
>
> I use the following in my emacs config to set up the default font:
>
>   (set-frame-font "Liberation Mono-12" nil t)

I have:

  (set-frame-font "DejaVu Sans Mono-12" nil)

and it seems to display correctly too.

Ludo’.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-03-15 16:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-10 21:30 [PATCH] gnu: emacs: Use libotf Roel Janssen
2016-03-11 16:27 ` Ludovic Courtès
2016-03-14 12:22   ` Roel Janssen
2016-03-14 20:20     ` Alex Kost
2016-03-15 16:08       ` Ludovic Courtès
2016-03-15 16:01     ` Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.