[Sugar-devel] [GSOC] Font Editor Next Steps
Dave Crossland
dave at lab6.com
Sun May 22 18:01:49 EDT 2016
Hi
On 22 May 2016 at 17:50, Yash Agarwal <agrwal.ysh94 at gmail.com> wrote:
> Thanks for the feedback Dave!
> I've made the changes to the proposal
> <https://sugarlabs.github.io/edit-fonts-activity/latest-proposal> as per
> your comments
>
Thanks!
> I need help/advice regarding a few things:
> I'm going to ask them here and then make a compiled blog post in a
> question-answer format once we sort them out. IMHO this will be a better
> way to document this.
>
Sounds good :)
> [WORKING WITH FONTS INSIDE SUGAR]
> I found much of the info regarding loading fonts and using them to format
> a text string in Gonzalo
> Odiard's
> code
> <https://github.com/sugarlabs/edit-fonts-activity/blob/master/activity.py> (which
> was a great read :D) . But this Activity only lists the current fonts in
> the system and to make a proper font manager I need to know the following:
>
> 1. Where are fonts stored in sugar and what format they are stored in?
>
> You can find the locations of ttfs on a GNU system by running,
$ locate ttf
https://wiki.sugarlabs.org/go/The_Undiscoverable/Fonts mentions that users
can store fonts in ~/.fonts/ and that the FontConfig cache tool must be
used when fonts are copied into there to update the FontConfig database.
http://www.sanfoundry.com/fc-cache-command-usage-linux/ explains this a
little more.
>
> 1. How to install/uninstall (or Activate/Deactivate) fonts both at
> runtime Activity(if we can) and externally(using Ubuntu)?
>
> I suggest checking the source code of https://fontmanager.github.io :)
>
> 1. if we are going to make collections of fonts and marking some fonts
> as favorites where should these setting be saved?
>
> That's a great question that I don't know, but I hope experienced Sugar
developers can answer :)
> [MAKING A GLYPH PICKER INTERFACE]
> **A grid layout of all the Glyphs within a font like this
> <https://raw.githubusercontent.com/sugarlabs/edit-fonts-activity/gh-pages/files/img/3.png>
> **
>
> 1. How should we render the Glyphs in the boxes, using Gtk-Cairo or
> through Pango which will require the font to be installed as a .ttf maybe?
>
> Since this is about the font editor part of the application, the glyphs
will be defcon objects, and thus need to be rendered with Cairo as drawings
rather than with Pango as binary fonts.
> [MAKING A GLYPH EDITING INTERFACE]
> **A drawing area where we can edit the Glyphs within a font like this
> <https://raw.githubusercontent.com/sugarlabs/edit-fonts-activity/gh-pages/files/img/4.png>
> **
>
> 1. Should the Glyphs be rendered in this using Cairo?
>
>
Yes.
>
> 1. if yes then should I write my own method for this or is there
> something inbuilt in Cairo or a 3rd party lib for reading ufo3's
> .glif files?
>
> defcon reads the UFO (and thus its GLIF files) and loads their bezier
outlines as python objects, so you can use pycairo to render them.
> I found these links quite useful for getting started with Cairo
>
>
> - http://www.tortall.net/mu/wiki/CairoTutorial
> - http://zetcode.com/gfx/pycairo/basicdrawing/
>
> :)
> [regarding the way FONTS ARE MODELED in UFOv3
> <http://unifiedfontobject.org/versions/ufo3/index.html>]
>
> 1. why do we need multiple layers in a font?(to store multiple
> families..?)
>
> When drawing anything it is useful to have reference material close to
hand. Almost all graphics editors have layers for this purpose -
gimp/photoshop, inkscape/illustrator, scribus/indesign, etc etc.
>
> 1. why do we need to group glyphs? (is it only for Kearning?)
>
> Yes, http://unifiedfontobject.org/versions/ufo3/groups.plist/ says,
"Groups may be used as members of kerning pairs in kerning.plist."
> 1. why do we need the image files?(are they used to render the glyphs?)
>
> Which image files?
--
Cheers
Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20160522/23bdd3c1/attachment.html>
More information about the Sugar-devel
mailing list