New Member
Posts: 1
Registered: ‎04-08-2013
Message 1 of 4 (366 Views)

DWF Toolkit 7.7 rotate text.

366 Views, 3 Replies
09-27-2013 12:37 AM

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::smileyfrustrated:uccess || result == WT_Result::End_Of_DWF_Opcode_Found))
    WT_Object* pCurrObject = _pFile->object();
    WT_Object::WT_ID objectId = pCurrObject->object_id();
    int rotation;
    switch (objectId)
      case WT_Object::Text_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;
      case WT_Object::Font_ID:
        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.



Active Member
Posts: 6
Registered: ‎08-02-2012
Message 2 of 4 (240 Views)

Re: DWF Toolkit 7.7 rotate text.

03-28-2014 01:33 PM in reply to: StanislavB

The same problem, is there information about text rotation in other place than WT_Font?

Active Member
Posts: 6
Registered: ‎08-02-2012
Message 3 of 4 (207 Views)

Re: DWF Toolkit 7.7 rotate text.

04-10-2014 02:44 PM in reply to: bkdi

The WT_Font_Option_Flags flags topic is the answer for above questions.

Posts: 15
Registered: ‎03-27-2012
Message 4 of 4 (188 Views)

What influences text rotation?

04-18-2014 03:53 PM in reply to: bkdi

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?

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!