flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcl...@apache.org
Subject [2/2] git commit: [flex-utilities] [refs/heads/develop] - update examples to use open san fonts
Date Tue, 29 Jul 2014 07:18:50 GMT
update examples to use open san fonts


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/da51582f
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/da51582f
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/da51582f

Branch: refs/heads/develop
Commit: da51582f7fba1d8e3a7cb4c933852a1b910aad35
Parents: 899613d
Author: Justin Mclean <jmclean@apache.org>
Authored: Tue Jul 29 17:15:54 2014 +1000
Committer: Justin Mclean <jmclean@apache.org>
Committed: Tue Jul 29 17:15:54 2014 +1000

----------------------------------------------------------------------
 .../src/effects/FadeEffectExample.mxml          | 23 +++++++++-----------
 .../src/effects/RotateEffectExample.mxml        | 19 ++++++++--------
 2 files changed, 20 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/da51582f/TourDeFlex/TourDeFlex3/src/effects/FadeEffectExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/effects/FadeEffectExample.mxml b/TourDeFlex/TourDeFlex3/src/effects/FadeEffectExample.mxml
index 3a57570..bad3e95 100755
--- a/TourDeFlex/TourDeFlex3/src/effects/FadeEffectExample.mxml
+++ b/TourDeFlex/TourDeFlex3/src/effects/FadeEffectExample.mxml
@@ -17,18 +17,15 @@
   -->
 
 <!-- Simple example to demonstrate the Fade effect. -->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" 
-    initialize="Font.registerFont(myriad_font);">
-
-    <mx:Script>
-        <![CDATA[
-        
-            import flash.text.Font;
-            
-            [Embed("assets/MyriadWebPro.ttf", fontName="MyMyriad")]
-            public var myriad_font:Class;
-        ]]>
-    </mx:Script>
+<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
+	
+	<mx:Style>
+	     @font-face {
+	        src:url("../assets/OpenSans-Regular.ttf");
+	        fontFamily: OpenSans;
+			embedAsCFF: false;
+	     }    
+	</mx:Style>
     
     <mx:Fade id="fadeOut" duration="1000" alphaFrom="1.0" alphaTo="0.0"/>
     <mx:Fade id="fadeIn" duration="1000" alphaFrom="0.0" alphaTo="1.0"/>
@@ -40,7 +37,7 @@
             text="Use the Fade effect to show or hide the text and image. Use an embedded
font when applying the Fade effect to text."/>
 
         <mx:Label text="Apache Flex"  
-            fontFamily="MyMyriad" fontSize="14"
+            fontFamily="OpenSans" fontSize="14"
             visible="{cb1.selected}"
             hideEffect="{fadeOut}" showEffect="{fadeIn}"/>
             

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/da51582f/TourDeFlex/TourDeFlex3/src/effects/RotateEffectExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/effects/RotateEffectExample.mxml b/TourDeFlex/TourDeFlex3/src/effects/RotateEffectExample.mxml
index 5d3dfce..9de9488 100755
--- a/TourDeFlex/TourDeFlex3/src/effects/RotateEffectExample.mxml
+++ b/TourDeFlex/TourDeFlex3/src/effects/RotateEffectExample.mxml
@@ -17,17 +17,10 @@
   -->
 
 <!-- Simple example to demonstrate the Rotate effect. -->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" 
-    initialize="Font.registerFont(myriad_font);">
+<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
 
     <mx:Script>
         <![CDATA[
-
-            import flash.text.Font;
-            
-            [Embed("assets/MyriadWebPro.ttf", fontName="MyMyriad")]
-            public var myriad_font:Class;
-
             [Bindable]
             public var angle:int=0;
 
@@ -39,6 +32,14 @@
       ]]>
     </mx:Script>
 
+	<mx:Style>
+	     @font-face {
+	        src:url("../assets/OpenSans-Regular.ttf");
+	        fontFamily: OpenSans;
+			embedAsCFF: false;
+	     }    
+	</mx:Style>
+
     <mx:Rotate id="rotate" angleFrom="{angle-45}" angleTo="{angle}" target="{myVB}"/>
 
     <mx:Panel title="Rotate Effect Example" horizontalAlign="center" 
@@ -47,7 +48,7 @@
 
         <mx:VBox id="myVB" width="50%" horizontalAlign="center">
             <mx:Label text="Apache Flex"  
-                fontFamily="MyMyriad" fontSize="14"/>
+                fontFamily="OpenSans" fontSize="14"/>
 
             <mx:Image id="img" 
                 source="@Embed(source='assets/ApacheFlexLogo.png')"/>


Mime
View raw message