FontAwesome update?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

FontAwesome update?

Mariano Martinez Peck
Hi Torsten,

We are using your great FontAwesome project since several months so far. Really nice! Thank you. 

Now, let me ask, is there a way to easily update it to 4.4? I guess you did not create all the extension methods by hand, so if it was a script maybe it is not that hard to update. Not only I would like to use new icons, but also some of the facilities like "Rotated & Flipped" that you can read in http://fontawesome.io/examples/

Finally.... if you can also provide that "magic" script to update, that would be terrific, so that we can easily update again for newer versions.

Thank you very much in advance, 

--

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Aw: FontAwesome update?

Torsten Bergmann
Dear Mariano,
 
answer is simple: there is no (magic) script. So far the changes between the versions were not much
and it was easy to update and provide them. 
 
What I usually did:
 - create a separate new metadata file library and import the updated new lib from a directory into Seaside
   so that the methods for the CSS and fonts are created 
 - the move the methods to the appropriate FontAwesome class (either developmont or deployment class
   or the superclass if shared)
 - add the necessary extension methods - each one with a test case
 
May sound like boring work to create a method for each new possibility of FontAwesome (and yes it is) -
but it helped me to go through all the features understand what can be done with the framework. 
Sorry if you thought there is magic involved...
 
Thanks
Torsten
 
Gesendet: Montag, 08. August 2016 um 18:58 Uhr
Von: "Mariano Martinez Peck" <[hidden email]>
An: "Seaside - general discussion" <[hidden email]>
Cc: "Torsten Bergmann" <[hidden email]>
Betreff: FontAwesome update?
Hi Torsten,
 
We are using your great FontAwesome project since several months so far. Really nice! Thank you. 
 
Now, let me ask, is there a way to easily update it to 4.4? I guess you did not create all the extension methods by hand, so if it was a script maybe it is not that hard to update. Not only I would like to use new icons, but also some of the facilities like "Rotated & Flipped" that you can read in http://fontawesome.io/examples/
 
Finally.... if you can also provide that "magic" script to update, that would be terrific, so that we can easily update again for newer versions.
 
Thank you very much in advance, 
 
--

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: FontAwesome update?

Mariano Martinez Peck


On Mon, Aug 8, 2016 at 2:57 PM, Torsten Bergmann <[hidden email]> wrote:
Dear Mariano,
 
answer is simple: there is no (magic) script. So far the changes between the versions were not much
and it was easy to update and provide them. 
 
What I usually did:
 - create a separate new metadata file library and import the updated new lib from a directory into Seaside
   so that the methods for the CSS and fonts are created 
 - the move the methods to the appropriate FontAwesome class (either developmont or deployment class
   or the superclass if shared)
 - add the necessary extension methods - each one with a test case
 
May sound like boring work to create a method for each new possibility of FontAwesome (and yes it is) -
but it helped me to go through all the features understand what can be done with the framework. 
Sorry if you thought there is magic involved...
 

Hi Torsten,

Thanks for your answer.

I understand now. Sorry, I thought you had as script for that.
Now...let's say I can live with hardcoding the css class of each icon..say:

html span 
  fontAwesome;
fontAwesome2x; 
      with: [ html span class: 'fa-header' ].

Then...all I would have to do is to update #cssfontawesomeCssContent to the latest CSS File and I should be ready to go, correct?

Thanks in advance!

 
Thanks
Torsten
 
Gesendet: Montag, 08. August 2016 um 18:58 Uhr
Von: "Mariano Martinez Peck" <[hidden email]>
An: "Seaside - general discussion" <[hidden email]>
Cc: "Torsten Bergmann" <[hidden email]>
Betreff: FontAwesome update?
Hi Torsten,
 
We are using your great FontAwesome project since several months so far. Really nice! Thank you. 
 
Now, let me ask, is there a way to easily update it to 4.4? I guess you did not create all the extension methods by hand, so if it was a script maybe it is not that hard to update. Not only I would like to use new icons, but also some of the facilities like "Rotated & Flipped" that you can read in http://fontawesome.io/examples/
 
Finally.... if you can also provide that "magic" script to update, that would be terrific, so that we can easily update again for newer versions.
 
Thank you very much in advance, 
 
--



--

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: FontAwesome update?

Mariano Martinez Peck

On Mon, Aug 8, 2016 at 3:45 PM, Mariano Martinez Peck <[hidden email]> wrote:


On Mon, Aug 8, 2016 at 2:57 PM, Torsten Bergmann <[hidden email]> wrote:
Dear Mariano,
 
answer is simple: there is no (magic) script. So far the changes between the versions were not much
and it was easy to update and provide them. 
 
What I usually did:
 - create a separate new metadata file library and import the updated new lib from a directory into Seaside
   so that the methods for the CSS and fonts are created 
 - the move the methods to the appropriate FontAwesome class (either developmont or deployment class
   or the superclass if shared)
 - add the necessary extension methods - each one with a test case
 
May sound like boring work to create a method for each new possibility of FontAwesome (and yes it is) -
but it helped me to go through all the features understand what can be done with the framework. 
Sorry if you thought there is magic involved...
 

Hi Torsten,

Thanks for your answer.

I understand now. Sorry, I thought you had as script for that.
Now...let's say I can live with hardcoding the css class of each icon..say:

html span 
  fontAwesome;
fontAwesome2x; 
      with: [ html span class: 'fa-header' ].

Then...all I would have to do is to update #cssfontawesomeCssContent to the latest CSS File and I should be ready to go, correct?


mmm I may also need to update the fonts methods such as #fontsfontawesomewebfontEotContent in case they changed with latest release...

Do you recall how to generated those methods?  Because we must create the ByteArray thingy out of those svg, ttf, file

Thanks!
 
Thanks in advance!

 
Thanks
Torsten
 
Gesendet: Montag, 08. August 2016 um 18:58 Uhr
Von: "Mariano Martinez Peck" <[hidden email]>
An: "Seaside - general discussion" <[hidden email]>
Cc: "Torsten Bergmann" <[hidden email]>
Betreff: FontAwesome update?
Hi Torsten,
 
We are using your great FontAwesome project since several months so far. Really nice! Thank you. 
 
Now, let me ask, is there a way to easily update it to 4.4? I guess you did not create all the extension methods by hand, so if it was a script maybe it is not that hard to update. Not only I would like to use new icons, but also some of the facilities like "Rotated & Flipped" that you can read in http://fontawesome.io/examples/
 
Finally.... if you can also provide that "magic" script to update, that would be terrific, so that we can easily update again for newer versions.
 
Thank you very much in advance, 
 
--



--



--

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Aw: Re: FontAwesome update?

Torsten Bergmann
Mariano wrote:
>mmm I may also need to update the fonts methods such as #fontsfontawesomewebfontEotContent in case they changed with latest release...
>Do you recall how to generated those methods?  Because we must create the ByteArray thingy out of those svg, ttf, file

As I said:

 1. create a temporary package "MyTempPackage", create a simple class "MyTempLib" as subclass of WAFileMetadataLibrary

 2. Extract the FontAwesome download into a directory and
    then evaluate

      MyTempLib recursivelyAddAllFilesIn: 'c:\pathToFontAwesome\'
 
 3. now you have all the resources generated as methods in this temporary class. Now copy or move these methods over to the appropriate:
 
    Put it into
      - "FAWDevelopmentLibrary" when the resource is DEVELOPMENT related (for instance #cssfontawesomeCss with #cssfontawesomeCssContent
      - "FAWDeploymentLibrary" when the resource is DEPLOYMENT related (minified versions like #cssfontawesomeminCss with #cssfontawesomeminCssContent      
   
   If a resource method is necessary for DEVELOPMENT and DEPLOYMENT move/copy it to the common superclass FAWFileLibrary

   This is because for easy debugging/development one would choose the FAWDevelopmentLibrary and for later deployment
   one would used the FAWDeploymentLibrary which provides the minimized versions.

When are finished moving the methods over and it was already an existing method the Pharo diff tool in Monticello could show you if they
really changed for the new FontAwesome version or stay with the same contents. Mostly all the files (also the fonts) change for an updated
FontAwesome version, havent checked for the latest one.

 4. Provide implementation and test methods:

    a) In package "FontAwesome-Core" add the necessary extension methods to class "WATagBrush" for the new provided FontAwesome CSS classes
       Follow the naming convention and let the method name start with "fontAwesome..."

    b) Dont forget to add a testcase for each of the new extension methods
       This can be done in package "FontAwesome-Tests-Core-Canvas" in Sunit class "FAWCanvasBrushTest"

 5. Check if the example already includes the new stuff, for instance icons will be added automagicaly when following the
    naming convention. See FAWExamplesHome>>renderIconsOn: method how this is implemented.

    You can also add other examples to the class FAWExamplesHome. Double check that it is working on http://localhost:8080/fontawesome

 6. When stable and all tests pass I usually update the ConfiguratonOfFontAwesome and release a new version (also in Catalog)

Thats it. Hope it helps reproducing my steps.

Thanks
T.
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside