Bug 1034407 - add SVG rnotes support in anaconda
Summary: add SVG rnotes support in anaconda
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Chris Lumens
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-25 18:54 UTC by dominique
Modified: 2014-06-09 16:04 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-09 16:04:37 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description dominique 2013-11-25 18:54:20 UTC
Please see this bug : https://bugzilla.redhat.com/show_bug.cgi?id=1034390

"This is not a bug, but a suggestion.

Look at bug 1013280, and comment 32;

adam wrote : 

"We note that we should check that the additional images don't make the package so much bigger that it causes any of our release-blocking images to go over their size limits - particularly the desktop live image, which is very close to its limit."

And it's true, five jpg image for all language is very big.

I suggest to use svg files instead of jpg files, because in svg file you can have internationalization, with tag "switch" and "systemLanguage=xxxx".
For example, if the system is set to fr, and if there is a french translation in the svg file, the image show the french translation.

And if there are no translation, the image show the default (en).

For test I made the five .svg files with six languages (es, fr, ja, uk, zh_CN and zh_TW) and english for default : https://mega.co.nz/#!MNlCVTCI!bgluZghGZ6qW92WANP1BrzFlLRRYOwfk_TnzzlOUH3k

For info :

rnote with .jpg files = 1.3 Mio
rnote with .svg files = 154.8 Kio

But I am not a programmer or dev, and I don't know if anaconda support svg files."

Is anaconda support .svg files ?

Comment 1 dominique 2013-12-01 19:24:33 UTC
I have another question : What fonts are available in anaconda ?

For example, if my svg files use Comfortaa and anaconda no, it use the default one and I don't know which (and the render will be different).

Comment 2 dominique 2013-12-06 10:29:35 UTC
I can see that anaconda don't use Comfortaa but Cantarell.

I made .svg files with this fonts : https://mega.co.nz/#!BNEBAZbZ!WApOFhUSw9f-lhbYoRIwHn714n4k5YA82_SNSPYMbyU

Comment 3 Chris Lumens 2013-12-09 20:44:29 UTC
I've pushed a patch to master to look for SVG files.  If they don't work during the F21 cycle, please let us know.

Comment 4 dominique 2013-12-10 18:36:45 UTC
Thank Chris 
But for test I think we should also change the fedora-logos package, and include the svg file in rnote directory instead of the directories with the svg files.

Comment 5 dominique 2013-12-25 08:09:54 UTC
Hi Chris and Merry Christmas...

 I do tests since a week, and now I have good results.

I unpack the Fedora-20-x86_64-DVD.iso, and after I unpack the /Fedora-20-x86_64-DVD/LiveOS/squashfs.img in a folder (with unsquashfs squashfs.img command).

I mount this unpack in other folder with "mount -o loop,rw" command. 
In this folder I modify:

-- replace all folder in /usr/share/anaconda/pixmaps/rnotes by just one "en", with the five .svg in comment 2 in it.

-- I modify /usr/lib64/python2.7/site-packages/pyanaconda/ui/gui/hubs/progress.py with your patch (except line 31, "from pyanaconda.i18n import _, C_" I don't know why but anaconda crash with this line)


After re-pack all that, I launch in a virtual machine, and that work : the .svg are displayed.

I test fr, es and en.

I do other test with .svg write with Comfortaa font, but this fonts are not displayed, the svg are also displayed with Cantarell fonts.


I hope that test help you.

Comment 6 dominique 2013-12-26 06:45:46 UTC
I do a last test :
in the unpacked squashfs.img I add in /usr/share/fonts the Comfortaa fonts and use the .svg write with that font.
After repack the squashfs.img size is same that original one (271.2 Mio) and in installation all .svg show the good fonts (Comfortaa).

Can you add this font in anaconda ?

Comment 7 Alick Zhao 2013-12-26 15:34:06 UTC
Hi dominique, did you test with zh_CN locale? I'm not sure if it can be displayed correctly since Comfortaa does not seem to cover characters in CJK region.

Comment 8 dominique 2013-12-26 20:31:50 UTC
(In reply to Alick Zhao from comment #7)
> Hi dominique, did you test with zh_CN locale? I'm not sure if it can be
> displayed correctly since Comfortaa does not seem to cover characters in CJK
> region.

Hi Alick 
I don't test with zn_CN locale because I can't choose in the window language : it's write in Chinese and I don't know this language.

There are 4 choices for Chinese, zh_CN is in what position? (1 or 2 or 3 or 4)

Comment 9 dominique 2013-12-27 06:52:55 UTC
Hi Alick, I made snapshot here: http://pix.toile-libre.org/upload/original/1388127035.png

zh_CN is in 1, 2, 3 or 4 position ?

Comment 10 Alick Zhao 2013-12-27 14:54:37 UTC
(In reply to dominique from comment #9)
> Hi Alick, I made snapshot here:
> http://pix.toile-libre.org/upload/original/1388127035.png
> 
> zh_CN is in 1, 2, 3 or 4 position ?

Hi dominique, zh_CN is the first one, i.e. the selected one in your snapshot.

Comment 11 dominique 2013-12-27 15:13:05 UTC
Hi alick,
here the tarball with screen-shot of anaconda installation.

One with cantarell font and other with comfortaa.

Let me know which is good for you.

https://mega.co.nz/#!NMUhGZZC!TVxE821_KGwne24R-xbgQgAzyEU7P3qdW80X-IU1Gz0

Comment 12 Alick Zhao 2013-12-27 15:49:51 UTC
Hi dominique,
the svg-comfortaa one looks more right to me. But I do not understand why the Chinese font is not the same in both cases. I think in both tests, there should be font substitution made by fontconfig.

Comment 13 dominique 2013-12-27 16:06:16 UTC
I think you are right, because I just add comfortaa fonts in /usr/share/fonts, but I don't made a comfortaa.conf in /usr/share/fontconfig/conf.avail. 
I don't know how to fill it, may-be like the cantarell.conf :

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "../fonts.dtd">
<!--

     Define aliasing and other fontconfig settings for Cantarell.

-->
<fontconfig>
  <!-- Generic name assignment -->
  <match target="pattern">
    <test qual="any" name="family">
      <string>Cantarell</string>
    </test>
    <edit name="family" mode="assign" binding="weak">
      <string>Cantarell</string>
    </edit>
  </match>
</fontconfig>

Comment 14 dominique 2013-12-27 20:05:13 UTC
I do an other test after add a file for comfortaa in /usr/share/fontconfig/conf.avail, (file 61-aajohan-comfortaa.conf, I recovered on my fedora 20 after installed Comfortaa fonts).

Result is exactly the same that the screen-shot I post in comment 11.

Comment 15 Adam Williamson 2014-01-30 21:00:31 UTC
So, um, if the point here is to save space, are we actually achieving that if we have to add comfortaa to the installer? We save ~1MB by this svg dodge, but how much extra space does comfortaa occupy?

dnf says:

Size        : 515 k

but I'm never sure if that's a measure of compressed or uncompressed size.

Did you check the rendering with other fonts that are already available to the installer?

Comment 16 dominique 2014-01-31 05:57:02 UTC
@Adam Williamson

I think it's the uncompressed size, because when I do test (add comfortaa font in the rootfs.img), the size of squashfs.img is the same.

I do test with other fonts (Cantarell and DejaVU) and that work fine, but the rendering is not as nice.

But I think it's now fixed, Brian C. Lane add comfortaa fonts in lorax package, see here :
https://bugzilla.redhat.com/show_bug.cgi?id=1047430
https://git.fedorahosted.org/cgit/lorax.git/


Note You need to log in before you can comment on or make changes to this bug.