def OSXFontDirectory():
fontpaths = []<EOL>def add(arg,directory,files):<EOL><INDENT>fontpaths.append(directory)<EOL><DEDENT>for fontdir in OSXFontDirectories:<EOL><INDENT>try:<EOL><INDENT>if os.path.isdir(fontdir):<EOL><INDENT>os.path.walk(fontdir, add, None)<EOL><DEDENT><DEDENT>except (IOError, OSError, TypeError, ValueError):<EOL><INDENT>pass<EOL><DEDENT><DEDENT>return fontpaths<EOL>
Return the system font directories for OS X.  This is done by
starting at the list of hardcoded paths in
:attr:`OSXFontDirectories` and returning all nested directories
within them.