[gtksourceview] css.lang: @font-face improvements



commit d674f6d65aff6b5ca34da332e66b3dedbbb8103e
Author: Jeffery To <jeffery to gmail com>
Date:   Wed May 9 20:35:39 2018 +0800

    css.lang: @font-face improvements
    
    * Add src property name
    * Add support for unicode wildcard ranges (e.g. U+4??)
    
    https://bugzilla.gnome.org/show_bug.cgi?id=796130

 data/language-specs/css.lang       |    3 ++-
 tests/syntax-highlighting/file.css |    8 ++++++++
 2 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/data/language-specs/css.lang b/data/language-specs/css.lang
index 2adc4ee..e84314c 100644
--- a/data/language-specs/css.lang
+++ b/data/language-specs/css.lang
@@ -320,7 +320,7 @@
     </context>
 
     <context id="unicode-range" style-ref="others-2">
-      <match>u\+[a-f0-9]{1,6}(-[a-f0-9]{1,6})?</match>
+      <match>u\+[a-f0-9?]{1,6}(-[a-f0-9]{1,6})?</match>
     </context>
 
     <context id="importance-modifier" style-ref="keyword">
@@ -512,6 +512,7 @@
       <keyword>perspective</keyword>
       <keyword>pointer-events</keyword>
       <keyword>resize</keyword>
+      <keyword>src</keyword>
       <keyword>tab-size</keyword>
       <keyword>text-align-last</keyword>
       <keyword>text-combine-upright</keyword>
diff --git a/tests/syntax-highlighting/file.css b/tests/syntax-highlighting/file.css
index dc3b61b..21af3e0 100644
--- a/tests/syntax-highlighting/file.css
+++ b/tests/syntax-highlighting/file.css
@@ -1,3 +1,11 @@
+@font-face {
+    font-family: MyHelvetica;
+    src: local("Helvetica Neue"),
+         local("HelveticaNeue"),
+         url(MgOpenModerna.ttf);
+    unicode-range: U+0025-00FF, U+4??;
+}
+
 #testID[lang|="zh"] {
     font: 12px italic "Overpass";
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]