This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch jewel-ui
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit b80fea697e62d95ff0df5bb467f27b74fb3a3d3e
Author: Carlos Rovira <carlosrov...@apache.org>
AuthorDate: Tue Mar 6 21:57:58 2018 +0100

    add JewelThemeFontInject and configuration, but still doesn't work
---
 .../royale/org/apache/royale/jewel/Application.as  |  1 -
 frameworks/themes/JewelTheme/pom.xml               | 11 ++++++++++
 .../src/main/config/compile-swf-config.xml         | 11 ++++++++++
 .../JewelTheme/src/main/resources/defaults.css     |  3 +++
 .../src/main/resources/jewel-theme-as-manifest.xml | 24 +++++++++++++++++++++
 .../src/main/resources/jewel-theme-manifest.xml    | 25 ++++++++++++++++++++++
 .../src/main/royale/JewelThemeClasses.as           | 18 +++-------------
 .../apache/royale/jewel/JewelThemeFontInject.as}   | 10 ++++-----
 8 files changed, 81 insertions(+), 22 deletions(-)

diff --git 
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Application.as
 
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Application.as
index fed1673..b29f0a4 100644
--- 
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Application.as
+++ 
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Application.as
@@ -40,7 +40,6 @@ package org.apache.royale.jewel
          *
                 * <inject_html>
                 * <meta name="viewport" content="width=device-width, 
initial-scale=1, minimum-scale=1, maximum-scale=1">
-                * <link href="https://fonts.googleapis.com/css?family=Lato"; 
rel="stylesheet">
         * </inject_html>
                 * 
          *  @langversion 3.0
diff --git a/frameworks/themes/JewelTheme/pom.xml 
b/frameworks/themes/JewelTheme/pom.xml
index ea75e2d..14bfda6 100644
--- a/frameworks/themes/JewelTheme/pom.xml
+++ b/frameworks/themes/JewelTheme/pom.xml
@@ -41,6 +41,17 @@
         <version>${royale.compiler.version}</version>
         <extensions>true</extensions>
         <configuration>
+          <namespaces>
+            <namespace>
+              <uri>library://ns.apache.org/royale/jewel</uri>
+              
<manifest>${project.basedir}/src/main/resources/jewel-theme-manifest.xml</manifest>
+            </namespace>
+            <namespace>
+              <type>as</type>
+              <uri>library://ns.apache.org/royale/jewel</uri>
+              
<manifest>${project.basedir}/src/main/resources/jewel-theme-as-manifest.xml</manifest>
+            </namespace>
+          </namespaces>
           <includeClasses>
             <includeClass>JewelThemeClasses</includeClass>
           </includeClasses>
diff --git 
a/frameworks/themes/JewelTheme/src/main/config/compile-swf-config.xml 
b/frameworks/themes/JewelTheme/src/main/config/compile-swf-config.xml
index 55679c7..a6b5c38 100644
--- a/frameworks/themes/JewelTheme/src/main/config/compile-swf-config.xml
+++ b/frameworks/themes/JewelTheme/src/main/config/compile-swf-config.xml
@@ -66,6 +66,17 @@
         <locale/>
         
         <library-path/>
+
+        <namespaces>
+            <namespace>
+                <uri>library://ns.apache.org/royale/jewel</uri>
+                <manifest>../resources/jewel-theme-manifest.xml</manifest>
+            </namespace>
+            <namespace>
+                <uri>library://ns.apache.org/royale/jewel</uri>
+                <manifest>../resources/jewel-theme-as-manifest.xml</manifest>
+            </namespace>
+        </namespaces>
         
         <source-path>
             <path-element>../royale</path-element>
diff --git a/frameworks/themes/JewelTheme/src/main/resources/defaults.css 
b/frameworks/themes/JewelTheme/src/main/resources/defaults.css
index 3d376ac..845a3a4 100644
--- a/frameworks/themes/JewelTheme/src/main/resources/defaults.css
+++ b/frameworks/themes/JewelTheme/src/main/resources/defaults.css
@@ -17,12 +17,15 @@
  *
  */
 
+ @namespace j "library://ns.apache.org/royale/jewel";
  @namespace "http://www.w3.org/1999/xhtml";;
 
  .royale *, . royale *:before, . royale *:after {
         -moz-box-sizing: border-box;
         -webkit-box-sizing: border-box;
         box-sizing: border-box;
+
+       fonts: ClassReference("org.apache.royale.jewel.JewelThemeFontInject");
  }
  
  .page-content
diff --git 
a/frameworks/themes/JewelTheme/src/main/resources/jewel-theme-as-manifest.xml 
b/frameworks/themes/JewelTheme/src/main/resources/jewel-theme-as-manifest.xml
new file mode 100644
index 0000000..05d8800
--- /dev/null
+++ 
b/frameworks/themes/JewelTheme/src/main/resources/jewel-theme-as-manifest.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+
+<componentPackage>
+    
+</componentPackage>
+
diff --git 
a/frameworks/themes/JewelTheme/src/main/resources/jewel-theme-manifest.xml 
b/frameworks/themes/JewelTheme/src/main/resources/jewel-theme-manifest.xml
new file mode 100644
index 0000000..b5a3258
--- /dev/null
+++ b/frameworks/themes/JewelTheme/src/main/resources/jewel-theme-manifest.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+
+<componentPackage>
+
+    <component id="JewelThemeFontInject" 
class="org.apache.royale.jewel.JewelThemeFontInject"/>
+    
+</componentPackage>
\ No newline at end of file
diff --git a/frameworks/themes/JewelTheme/src/main/royale/JewelThemeClasses.as 
b/frameworks/themes/JewelTheme/src/main/royale/JewelThemeClasses.as
index 1a1733c..3e88523 100644
--- a/frameworks/themes/JewelTheme/src/main/royale/JewelThemeClasses.as
+++ b/frameworks/themes/JewelTheme/src/main/royale/JewelThemeClasses.as
@@ -27,21 +27,9 @@ package
      */
     internal class JewelThemeClasses
     {
-        /**
-         *  constructor.
-         *
-                * <inject_html>
-                * <link href="https://fonts.googleapis.com/css?family=Lato"; 
rel="stylesheet">
-        * </inject_html>
-                * 
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion Royale 0.9.2
-         */
-               public function JewelThemeClasses()
-               {
-            super();
+        COMPILE::JS
+           {
+            import org.apache.royale.jewel.JewelThemeFontInject; 
JewelThemeFontInject;
         }
     }
 
diff --git a/frameworks/themes/JewelTheme/src/main/royale/JewelThemeClasses.as 
b/frameworks/themes/JewelTheme/src/main/royale/org/apache/royale/jewel/JewelThemeFontInject.as
similarity index 83%
copy from frameworks/themes/JewelTheme/src/main/royale/JewelThemeClasses.as
copy to 
frameworks/themes/JewelTheme/src/main/royale/org/apache/royale/jewel/JewelThemeFontInject.as
index 1a1733c..9d5f913 100644
--- a/frameworks/themes/JewelTheme/src/main/royale/JewelThemeClasses.as
+++ 
b/frameworks/themes/JewelTheme/src/main/royale/org/apache/royale/jewel/JewelThemeFontInject.as
@@ -16,16 +16,14 @@
 //  limitations under the License.
 //
 
////////////////////////////////////////////////////////////////////////////////
-package
+package org.apache.royale.jewel
 {
 
     /**
      *  @private
-     *  This class is used to link additional classes into JewelTheme.swc
-     *  beyond those that are found by dependecy analysis starting
-     *  from the classes specified in manifest.xml.
+     *  This class is used to link the font in html
      */
-    internal class JewelThemeClasses
+    public class JewelThemeFontInject
     {
         /**
          *  constructor.
@@ -39,7 +37,7 @@ package
          *  @playerversion AIR 2.6
          *  @productversion Royale 0.9.2
          */
-               public function JewelThemeClasses()
+               public function JewelThemeFontInject()
                {
             super();
         }

-- 
To stop receiving notification emails like this one, please contact
carlosrov...@apache.org.

Reply via email to