2012-01-12 23:32:09 +01:00
|
|
|
// Copyright (c) 2012, Thomas Goyne <plorkyeran@aegisub.org>
|
2007-07-29 03:21:28 +02:00
|
|
|
//
|
2012-01-12 23:32:09 +01:00
|
|
|
// Permission to use, copy, modify, and distribute this software for any
|
|
|
|
// purpose with or without fee is hereby granted, provided that the above
|
|
|
|
// copyright notice and this permission notice appear in all copies.
|
2007-07-29 03:21:28 +02:00
|
|
|
//
|
2012-01-12 23:32:09 +01:00
|
|
|
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
|
|
// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
|
|
// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
|
|
// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
|
|
// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
|
|
// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
|
|
// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
2007-07-29 03:21:28 +02:00
|
|
|
//
|
2009-07-29 07:43:02 +02:00
|
|
|
// Aegisub Project http://www.aegisub.org/
|
2007-07-29 03:21:28 +02:00
|
|
|
//
|
2009-07-29 07:43:02 +02:00
|
|
|
// $Id$
|
|
|
|
|
|
|
|
/// @file font_file_lister_freetype.h
|
|
|
|
/// @see font_file_lister_freetype.cpp
|
|
|
|
/// @ingroup font_collector
|
|
|
|
///
|
2007-07-29 03:21:28 +02:00
|
|
|
|
2012-01-12 23:32:09 +01:00
|
|
|
#ifdef WITH_FREETYPE2
|
2007-07-29 03:21:28 +02:00
|
|
|
|
|
|
|
#include "font_file_lister.h"
|
|
|
|
|
2012-01-12 23:32:09 +01:00
|
|
|
#ifndef AGI_PRE
|
|
|
|
#include <map>
|
|
|
|
#include <set>
|
2007-07-29 03:21:28 +02:00
|
|
|
|
2012-01-12 23:32:09 +01:00
|
|
|
#include <wx/string.h>
|
|
|
|
#endif
|
Note: This was done using a script! it's far from perfect but 95% of the work has been done already formatting-wise.
Document all functions, class, struct, union, enum, macro, variable, typedefs. This isn't the actual document in itself but empty documentation using any old documentation if it was there.
This was done using exuberant ctags to get tag info, then a TCL script to parse/remove old comments and convert them into Doxygen-style.
Some notes:
* Anything labeled 'DOCME' needs to be documented, @param and @return have been left blank as it would be annoying to delete the 'DOCME' from every one of those.
* Some multiline comments may have been munged into single line comments
* Leave the /// comments above global variables with a space, if they're harder to read then we'll be less likey to use them.
* Enum comments can go after the enumeration itself '[value] /// comment'
* include/aegisub/*.h haven't been converted yet, this will be done in a later commit
* Some documentation blocks are in the wrong place, in the .h when it should be in the .cpp, or vice versa.
See http://devel.aegisub.org/wiki/Doxygen for some details on Doxygen and a 'style guide'.
Originally committed to SVN as r3312.
2009-07-30 00:59:22 +02:00
|
|
|
|
|
|
|
/// @class FreetypeFontFileLister
|
2012-01-12 23:32:09 +01:00
|
|
|
/// @brief Freetype2-based font collector
|
2007-07-29 03:21:28 +02:00
|
|
|
class FreetypeFontFileLister : public FontFileLister {
|
2012-01-12 23:32:09 +01:00
|
|
|
/// Map of face name -> possible containing files
|
|
|
|
std::map<wxString, std::set<wxString> > font_files;
|
Note: This was done using a script! it's far from perfect but 95% of the work has been done already formatting-wise.
Document all functions, class, struct, union, enum, macro, variable, typedefs. This isn't the actual document in itself but empty documentation using any old documentation if it was there.
This was done using exuberant ctags to get tag info, then a TCL script to parse/remove old comments and convert them into Doxygen-style.
Some notes:
* Anything labeled 'DOCME' needs to be documented, @param and @return have been left blank as it would be annoying to delete the 'DOCME' from every one of those.
* Some multiline comments may have been munged into single line comments
* Leave the /// comments above global variables with a space, if they're harder to read then we'll be less likey to use them.
* Enum comments can go after the enumeration itself '[value] /// comment'
* include/aegisub/*.h haven't been converted yet, this will be done in a later commit
* Some documentation blocks are in the wrong place, in the .h when it should be in the .cpp, or vice versa.
See http://devel.aegisub.org/wiki/Doxygen for some details on Doxygen and a 'style guide'.
Originally committed to SVN as r3312.
2009-07-30 00:59:22 +02:00
|
|
|
|
2012-01-12 23:32:09 +01:00
|
|
|
/// Set of files which were loaded from the cache
|
|
|
|
std::set<wxString> indexed_files;
|
2007-07-29 03:21:28 +02:00
|
|
|
|
2012-01-12 23:32:09 +01:00
|
|
|
/// Add a font to the list of mappings
|
|
|
|
/// @param filename Full path to font file
|
|
|
|
/// @param facename Font name
|
|
|
|
void AddFont(wxString const& filename, wxString facename);
|
2007-07-29 03:21:28 +02:00
|
|
|
|
2012-01-12 23:32:09 +01:00
|
|
|
/// Add a font to the list of mappings
|
|
|
|
/// @param filename Full path to font file
|
|
|
|
/// @param family Family name
|
|
|
|
/// @param style Style name
|
|
|
|
void AddFont(wxString const& filename, wxString const& family, wxString const& style);
|
2009-07-29 07:43:02 +02:00
|
|
|
|
2012-01-12 23:32:09 +01:00
|
|
|
public:
|
|
|
|
/// Constructor
|
|
|
|
/// @param cb Callback for status logging
|
|
|
|
FreetypeFontFileLister(FontCollectorStatusCallback cb);
|
|
|
|
|
2012-02-02 20:18:40 +01:00
|
|
|
CollectionResult GetFontPaths(wxString const& facename, int, bool, std::set<wxUniChar> const&);
|
2012-01-12 23:32:09 +01:00
|
|
|
};
|
Note: This was done using a script! it's far from perfect but 95% of the work has been done already formatting-wise.
Document all functions, class, struct, union, enum, macro, variable, typedefs. This isn't the actual document in itself but empty documentation using any old documentation if it was there.
This was done using exuberant ctags to get tag info, then a TCL script to parse/remove old comments and convert them into Doxygen-style.
Some notes:
* Anything labeled 'DOCME' needs to be documented, @param and @return have been left blank as it would be annoying to delete the 'DOCME' from every one of those.
* Some multiline comments may have been munged into single line comments
* Leave the /// comments above global variables with a space, if they're harder to read then we'll be less likey to use them.
* Enum comments can go after the enumeration itself '[value] /// comment'
* include/aegisub/*.h haven't been converted yet, this will be done in a later commit
* Some documentation blocks are in the wrong place, in the .h when it should be in the .cpp, or vice versa.
See http://devel.aegisub.org/wiki/Doxygen for some details on Doxygen and a 'style guide'.
Originally committed to SVN as r3312.
2009-07-30 00:59:22 +02:00
|
|
|
|
2012-01-12 23:32:09 +01:00
|
|
|
#endif
|