+for my $fn ("FontName", "NFontName") {
+ if (defined($options{$fn})) {
+ # split each entry and make a compiled regex
+ # Allow space between all characters
+ for my $e (@{$options{$fn}}) {
+ if ($e =~ /(\^|\\|\||\[|\]|\(|\)|\*|\+|\?)/) {
+ # already regex, don't manipulate
+ $e = qr/$e/i;
+ }
+ else {
+ my $u = decode('utf-8', $e);
+ my $fill = decode('utf-8', "\\s?");
+ my @u = split(//, $u);
+ my $ud = join($fill, @u);
+ my $e1 = encode('utf-8', $ud);
+ $e = qr/$e1/i;
+ }
+ }
+ }
+}
+