Tutorial/OpenSG1/Text: 16text_families.cpp
| File 16text_families.cpp, 0.6 kB (added by PatrickDaehne, 6 months ago) |
|---|
| Line | |
|---|---|
| 1 | // Includes |
| 2 | #include <OpenSG/OSGTextFaceFactory.h> |
| 3 | #include <vector> |
| 4 | #include <string> |
| 5 | #include <iostream> |
| 6 | |
| 7 | int main(int argc, char *argv[]) |
| 8 | { |
| 9 | // Create a vector of strings. |
| 10 | std::vector<std::string> families; |
| 11 | |
| 12 | // Fill the vector with the names of all font families installed |
| 13 | // on the system |
| 14 | OSG::TextFaceFactory::the().getFontFamilies(families); |
| 15 | |
| 16 | // Iterate over the names |
| 17 | std::vector<std::string>::const_iterator it; |
| 18 | for (it = families.begin(); it != families.end(); ++it) |
| 19 | std::cout << *it << std::endl; |
| 20 | |
| 21 | return EXIT_SUCCESS; |
| 22 | } |
