------------------------------------------------------------------------------
| 728 | |
| 729 | //------------------------------------------------------------------------------ |
| 730 | bool vtkFreeTypeTools::GetFace(size_t tprop_cache_id, FT_Face* face) |
| 731 | { |
| 732 | if (!face) |
| 733 | { |
| 734 | vtkErrorMacro(<< "Wrong parameters, face is nullptr"); |
| 735 | return false; |
| 736 | } |
| 737 | |
| 738 | FTC_Manager* manager = this->GetCacheManager(); |
| 739 | if (!manager) |
| 740 | { |
| 741 | vtkErrorMacro(<< "Failed querying the cache manager !"); |
| 742 | return false; |
| 743 | } |
| 744 | |
| 745 | // Map the id of a text property in the cache to a FTC_FaceID |
| 746 | FTC_FaceID face_id = reinterpret_cast<FTC_FaceID>(tprop_cache_id); |
| 747 | |
| 748 | FT_Error error = FTC_Manager_LookupFace(*manager, face_id, face); |
| 749 | if (error) |
| 750 | { |
| 751 | vtkErrorMacro(<< "Failed looking up a FreeType Face"); |
| 752 | } |
| 753 | |
| 754 | return !error; |
| 755 | } |
| 756 | |
| 757 | //------------------------------------------------------------------------------ |
| 758 | bool vtkFreeTypeTools::GetFace(vtkTextProperty* tprop, FT_Face* face) |
no test coverage detected