I extracted from plan of font data. Font contains the angle of rotation of the text data. Returns the font rotation in 360/65636ths of a degree.
Some text in plan rotated 90 degrees (rotation = 16383), but my code extracts from the plan file rotation = 0.
Here is my code:
result = _pFile->process_next_object();
if ((result == WT_Result:uccess || result == WT_Result::End_Of_DWF_Opcode_Found))
WT_Object* pCurrObject = _pFile->object();
WT_Object::WT_ID objectId = pCurrObject->object_id();
WT_Text* pText = (WT_Text*)pCurrObject;
WT_Logical_Point textPosition = pText->position();
std::string chars = dwfReaderUtils::WTstringToString(_pText->string())
std::cout << "Text: " << chars << " Rotate: " << rotation << std::endl;
WT_Font* pFont = (WT_Font*)pCurrObject;
rotation = pFont->rotation().rotation();
I also tried to extract the rotation angle of the text as follows:
WT_Rendition & rendition = _pFile-> rendition ();
const WT_Font & wtFont = rendition.font ();
rotation = wtFont.rotation (). rotation ();
But the result was the same.
Maybe someone knows how fix this problem? Help me.
Are there other entities or settings that influence text rotation?
In the file attached by OP there is no WT_Font_Option_Flags entity. Thus using font's rotation attribute leads to incorrect text rendering.
What else influences text's rotation?
Can WT_Object_Node somehow influence text's rotation?
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register