Topic: Google fonts

Hi all, I ask for a simple question that is fundamental for me.
i choose as title font of my gallery's one of google font (precisely "michroma") and i want the gallery to use my font also in other pcs that don't have michroma font installed. I know that simpleviewer cannot embed fonts directly but i think that google font can be linked.
I try to us the usual google apis for that but they don't work. can u give me some indication for that?
many thanks in advance. best regards

Re: Google fonts

As far as I am aware, this is not possible, though perhaps someone more familiar with Google Web Fonts can shed some more light on this scenario.
The gallery's 'Title' field is displayed in a Flash presentation rather than a standard HTML page and it would not be possible to link to the required external stylesheet within the confines of the SWF and XML files.

Steven Speirs
SimpleViewer Support Team.

Re: Google fonts

I'd have the same problem... Was trying to use external font in my gallery, but it seems to doesn't work (maybe I'm doing something wrong...).
The usual Google Web Fonts way can't work, but I've converted the WOFF font to TTF ( then I wrote a Flex embed like the one in the SimpleViewer Pro examples importing that TTF font with Flex's own @font-face implementation:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="" layout="absolute" width="100%" height="100%" frameRate="30" applicationComplete="init()">
    * SimpleViewer Flex Embed

   private var _svAPI:Object;
   private var _swfLoaded:Boolean = false;
   private var _galleryURL:String;
   private var _swfLoader:Loader;

   private function init():void {
       _swfLoader = new Loader();

    * Load SimpleViewer SWF
   private function loadGallery(galleryURL:String):void {
       _galleryURL = galleryURL;

       // Unload previous SimpleViewer instance
       if (_svAPI != null) {

       _svAPI = null;

       if (_swfLoaded) {

       // Load SimpleViewer SWF
       var urlReq:URLRequest = new URLRequest('svcore/swf/simpleviewer.swf');
       _swfLoader.contentLoaderInfo.addEventListener(Event.INIT, onViewerInit);
       _swfLoaded = true;

    * Fired when preloader is available (can set flashvars at this point)
   private function onViewerInit(e:Event):void {

       // Listen for svComplete event
       Object(_swfLoader.content).addEventListener('svComplete', onGalleryLoaded); 

       var flashvars:Object = Object(_swfLoader.content).embedOptions;
       flashvars.galleryURL = _galleryURL;
       flashvars.enableAPI = 'true';

    * Fired when gallery has completly loaded (SWF+XML)
    * API is now available.
   private function onGalleryLoaded(e:Event):void {
       _svAPI = Object(_swfLoader.content).api;
  @font-face {
      src: url("font/josefin-sans.ttf");
      fontFamily: JosefinSans;
      embedAsCFF: false;
 <mx:Canvas width="100%" height="100%" id="svContainer" backgroundColor="#3b5998" />

If I put an <mx:Text/> above that <mx:Canvas/> I can use that custom font, but if I try to use JosefinSans in the gallery's titleFontName config option, it doesn't work. Perhaps there's no way to do that, but it's a workaround...

Last edited by paulofreitas (2012-06-12 18:03:20)