File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,9 @@ impl From<ScriptExtension> for AugmentedScriptSet {
2222 let mut jpan = false ;
2323 let mut kore = false ;
2424
25- if ext. contains_script ( Script :: Han ) {
25+ if ext == ScriptExtension :: Single ( Script :: Common ) ||
26+ ext == ScriptExtension :: Single ( Script :: Inherited ) ||
27+ ext. contains_script ( Script :: Han ) {
2628 hanb = true ;
2729 jpan = true ;
2830 kore = true ;
@@ -84,6 +86,12 @@ impl AugmentedScriptSet {
8486 self . base . is_empty ( ) && ! self . hanb && !self . jpan && !self . kore
8587 }
8688
89+ /// Check if the set is "All" (Common or Inherited)
90+ pub fn is_all ( & self ) -> bool {
91+ self . base == ScriptExtension :: Single ( Script :: Common ) ||
92+ self . base == ScriptExtension :: Single ( Script :: Inherited )
93+ }
94+
8795 /// Construct an AugmentedScriptSet for a given character
8896 pub fn for_char ( c : char ) -> Self {
8997 ScriptExtension :: from ( c) . into ( )
You can’t perform that action at this time.
0 commit comments