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