|
Chris PeBenito |
2705f9 |
#
|
|
Chris PeBenito |
2705f9 |
# Fontconfig related types
|
|
Chris PeBenito |
2705f9 |
#
|
|
Chris PeBenito |
2705f9 |
# Author: Ivan Gyurdiev <ivg2@cornell.edu>
|
|
Chris PeBenito |
2705f9 |
#
|
|
Chris PeBenito |
2705f9 |
# fontconfig_domain(role_prefix) - create fontconfig domain
|
|
Chris PeBenito |
2705f9 |
#
|
|
Chris PeBenito |
2705f9 |
# read_fonts(domain, role_prefix) -
|
|
Chris PeBenito |
2705f9 |
# allow domain to read fonts, optionally per/user
|
|
Chris PeBenito |
2705f9 |
#
|
|
Chris PeBenito |
2705f9 |
|
|
Chris PeBenito |
2705f9 |
define(`fontconfig_domain', `
|
|
Chris PeBenito |
2705f9 |
|
|
Chris PeBenito |
2705f9 |
type $1_fonts_t, file_type, $1_file_type, sysadmfile;
|
|
Chris PeBenito |
2705f9 |
type $1_fonts_config_t, file_type, $1_file_type, sysadmfile;
|
|
Chris PeBenito |
2705f9 |
type $1_fonts_cache_t, file_type, $1_file_type, sysadmfile;
|
|
Chris PeBenito |
2705f9 |
|
|
Chris PeBenito |
2705f9 |
create_dir_file($1_t, $1_fonts_t)
|
|
Chris PeBenito |
2705f9 |
allow $1_t $1_fonts_t:{ dir file } { relabelto relabelfrom };
|
|
Chris PeBenito |
2705f9 |
|
|
Chris PeBenito |
2705f9 |
create_dir_file($1_t, $1_fonts_config_t)
|
|
Chris PeBenito |
2705f9 |
allow $1_t $1_fonts_config_t:file { relabelto relabelfrom };
|
|
Chris PeBenito |
2705f9 |
|
|
Chris PeBenito |
2705f9 |
# For startup relabel
|
|
Chris PeBenito |
2705f9 |
allow $1_t $1_fonts_cache_t:{ dir file } { relabelto relabelfrom };
|
|
Chris PeBenito |
2705f9 |
|
|
Chris PeBenito |
2705f9 |
') dnl fontconfig_domain
|
|
Chris PeBenito |
2705f9 |
|
|
Chris PeBenito |
2705f9 |
####################
|
|
Chris PeBenito |
2705f9 |
|
|
Chris PeBenito |
2705f9 |
define(`read_fonts', `
|
|
Chris PeBenito |
2705f9 |
|
|
Chris PeBenito |
2705f9 |
# Read global fonts and font config
|
|
Chris PeBenito |
2705f9 |
r_dir_file($1, fonts_t)
|
|
Chris PeBenito |
2705f9 |
r_dir_file($1, etc_t)
|
|
Chris PeBenito |
2705f9 |
|
|
Chris PeBenito |
2705f9 |
ifelse(`$2', `', `', `
|
|
Chris PeBenito |
2705f9 |
|
|
Chris PeBenito |
2705f9 |
# Manipulate the global font cache
|
|
Chris PeBenito |
2705f9 |
create_dir_file($1, $2_fonts_cache_t)
|
|
Chris PeBenito |
2705f9 |
|
|
Chris PeBenito |
2705f9 |
# Read per user fonts and font config
|
|
Chris PeBenito |
2705f9 |
r_dir_file($1, $2_fonts_t)
|
|
Chris PeBenito |
2705f9 |
r_dir_file($1, $2_fonts_config_t)
|
|
Chris PeBenito |
2705f9 |
|
|
Chris PeBenito |
2705f9 |
# There are some fonts in .gnome2
|
|
Chris PeBenito |
2705f9 |
ifdef(`gnome.te', `
|
|
Chris PeBenito |
2705f9 |
allow $1 $2_gnome_settings_t:dir { getattr search };
|
|
Chris PeBenito |
2705f9 |
')
|
|
Chris PeBenito |
2705f9 |
|
|
Chris PeBenito |
2705f9 |
') dnl ifelse
|
|
Chris PeBenito |
2705f9 |
') dnl read_fonts
|