Closed Bug 951292 Opened 11 years ago Closed 7 years ago

SVG to PNG graphic conversion at build time

Categories

(Firefox OS Graveyard :: Gaia, defect, P3)

ARM
Gonk (Firefox OS)
defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: epang, Unassigned)

References

Details

(Whiteboard: [c=devtools p=3 s= u=] ux-tracking, visual design, visual-tracking, bokken )

User Story

Problem: As we support more devices, mammoth amounts of time are being spend scaling graphics manually for new devices. This also causes Gaia to balloon as each app now has 5 different graphic sizes, and more to come each release. This is also a QA nightmare as each icon size needs to be tested to make sure everything is up to date.


Potential Solution: Rather than exporting PNGs for each device size and adding them to the app. We would just add SVG icons and at build time the compiler would take the SVG file and scale it to the required size.

Example for a qHD device.
The current flow works like this (I believe):
At build time the Gaia looks for graphics with @2x labels to best match the bigger resolution and includes them in the build. These graphics are located in every app folder.

New Flow:
At build time Gaia takes all the graphics in SVG format, scales them to @2x size and exports them into the needed folders.
This bug is to replace the current action icons (using pngs) with icon fonts.  This will help with the various icons sizes that are needed.
Blocks: 965889
Assignee: nobody → padamczyk
Summary: [Action Icons] Update action icons to use Icon Fonts → SVG to PNG graphic conversion at build time
Going to mark it S2, as it appears to be minimal in terms of work from dev, but still gathering all the info.
Target Milestone: --- → 1.5 S2 (23may)
Blocks: ScalingGFX
No longer blocks: SysFE, 965889
User Story: (updated)
Assigning this to Eli per our email conversation. This work is scheduled for our sprint starting 2014.05.09 ending 2014.05.23.
Assignee: padamczyk → eperelman
Priority: -- → P2
Hardware: x86 → ARM
Whiteboard: ux-tracking, visual design, visual-tracking, bokken → [c=devtools p= s= u=] ux-tracking, visual design, visual-tracking, bokken
Whiteboard: [c=devtools p= s= u=] ux-tracking, visual design, visual-tracking, bokken → [c=devtools p=3 s= u=] ux-tracking, visual design, visual-tracking, bokken
Patryk or Eric, with some of the recent conversations around SVG performance, and the efforts of bug 951593 and bug 999931, could you please give a status update as to the necessity of this?
Flags: needinfo?(padamczyk)
Flags: needinfo?(epang)
Target Milestone: 2.0 S2 (23may) → ---
Redirecting to Helen since I'm not longer working on this. Thanks!
Flags: needinfo?(epang) → needinfo?(hhuang)
Sorry for the late reply, but I don't know any update about SVG performance, maybe Patryk or Amy can provide more information.

Patryk/Amy, can you help with this?
Flags: needinfo?(hhuang) → needinfo?(amlee)
(In reply to Helen Huang from comment #5)
> Sorry for the late reply, but I don't know any update about SVG performance,
> maybe Patryk or Amy can provide more information.
> 
> Patryk/Amy, can you help with this?

Hi, 

I haven't been involved in the recent updates. I spoke to Casey and he can provide an update on this.
Flags: needinfo?(amlee) → needinfo?(kyee)
Just looking at bug 999931 Comment 14 suggests to me that there have been some improvements made to SVG memory usage and performance.  I'm not sure how to interpret the results and whether this amounts to enough improvements to be able to use SVG's in place of bitmap graphics or iconfont.   Flagging Eli for more information.
Flags: needinfo?(kyee)
Also, another thing worth mentioning is that we have been looking at using a SVG to Iconfont converter where it would be suitable.   This would avoid us having to export multiple resolution assets since they are inherently scalable.

https://github.com/sapegin/grunt-webfont
:eli with the recent B2G email thread: Icon fonts in FXOS, we're still pursuing the vector route. So at least for the next couple of months, SVG to PNG might be off the table since we may get what we really want in OS vector graphics. If that fails we may need to back to this plan.
Flags: needinfo?(padamczyk)
Assignee: eperelman → nobody
Priority: P2 → P3
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.