opennurbs_textiterator.h
1 /* $NoKeywords: $ */
2 /*
3 //
4 // Copyright (c) 1993-2012 Robert McNeel & Associates. All rights reserved.
5 // OpenNURBS, Rhinoceros, and Rhino3D are registered trademarks of Robert
6 // McNeel & Associates.
7 //
8 // THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
9 // ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF
10 // MERCHANTABILITY ARE HEREBY DISCLAIMED.
11 //
12 // For complete openNURBS copyright information see <http://www.opennurbs.org>.
13 //
14 ////////////////////////////////////////////////////////////////
15 */
16 
17 #if !defined(OPENNURBS_TEXTITERATOR_INC_)
18 #define OPENNURBS_TEXTITERATOR_INC_
19 
20 #define RTFFIRSTCHAR
21 
22 typedef struct tagFontKey
23 {
26 } ON_FontKey;
27 
29 {
30 public:
31  int m_rtf_font_index = -1;
33  unsigned int m_codepage = 1252;
34  unsigned int m_charset = 0;
35 };
36 
37 // Converts wchar_t characters to Unicode codepoints
39 {
40 private:
41  ON_TextIterator() = delete;
42 
43 public:
44  ON_TextIterator(const ON_wString& str);
45  ON_TextIterator(const wchar_t* str, size_t length);
46 
47 public:
48  ~ON_TextIterator() = default;
49  ON_TextIterator(const ON_TextIterator&) = default;
50  ON_TextIterator& operator=(const ON_TextIterator&) = default;
51 
52  /*
53  Parameters:
54  unicode_code_point - [out]
55  current unicode code point returned here.
56  0 = end of string
57  Returns:
58  true if returned unicode_code_point is not zero
59  */
60  bool PeekCodePoint(ON__UINT32& unicode_code_point) const;
61 
62  /*
63  Description:
64  Gets the current unicode code point and calls Step() to advance the text iterator
65  by one code point.
66  Parameters:
67  unicode_code_point - [out]
68  current unicode code point returned here.
69  0 = end of string
70  Returns:
71  true if returned unicode_code_point is not zero
72  */
73  bool ReadCodePoint(ON__UINT32& unicode_code_point);
74 
75 
76  bool Back(); // move position back and return current codepoint after moving back
77 
78  // Get the next UNICODE code point encoded in m_text beginning at m_text[m_next_text_ci];
79  // Save this code point in m_cur_codepoint.
80  // Advance m_next_text_ci.
81  bool Step();
82 
83  bool AtBackslashTic() const;
84  bool ReadCharValue(
85  unsigned char& c
86  );
87 private:
88 
89  const wchar_t* m_text = nullptr;
90  size_t m_length = 0;
91  size_t m_prev_text_ci = 0; // previous offset in m_text wchar_t string
92  size_t m_next_text_ci = 0; // previous offset in m_text wchar_t string
93  size_t m_cur_text_ci = 0; // current offset in m_text wchar_t string
94  ON__UINT32 m_prev_codepoint = 0; // previous UNICODE code point
95  ON__UINT32 m_cur_codepoint = 0; // UNICODE code point read by last call to Step()
96  struct ON_UnicodeErrorParameters m_ue = ON_UnicodeErrorParameters::MaskErrors;
97 };
98 
99 class ON_TextBuilder
100 {
101 public:
102  ON_TextBuilder();
104  virtual ~ON_TextBuilder();
105 
106  class TextProps
107  {
108  public:
109  TextProps()
110  {}
111  TextProps(
112  double height,
113  double stackscale,
114  ON_Color color,
115  ON_DimStyle::stack_format stackformat,
116  bool bold,
117  bool italic,
118  bool underlined,
119  bool strikethrough,
120  unsigned int charset)
121  : m_height(height)
122  , m_stackscale(stackscale)
123  , m_color(color)
124  , m_stackformat(stackformat)
125  , m_bold(bold)
126  , m_italic(italic)
127  , m_underlined(underlined)
128  , m_strikethrough(strikethrough)
129  , m_codepage(1252)
130  {}
131  double Height() const
132  {
133  return m_height;
134  }
135  void SetHeight(double h)
136  {
137  if (h > 1e-8)
138  m_height = h;
139  }
140  double StackScale() const
141  {
142  return m_stackscale;
143  }
144  void SetStackScale(double s)
145  {
146  if (0.0 < s && 10.0 > s)
147  m_stackscale = s;
148  }
149  ON_Color Color() const
150  {
151  return m_color;
152  }
153  void SetColor(ON_Color c)
154  {
155  m_color = c;
156  }
157  ON_DimStyle::stack_format StackFormat() const
158  {
159  return m_stackformat;
160  }
161  void SetStackFormat(ON_DimStyle::stack_format s)
162  {
163  m_stackformat = s;
164  }
165  bool IsBold()
166  {
167  return m_bold;
168  }
169  void SetBold(bool bold)
170  {
171  m_bold = bold;
172  }
173  bool IsItalic()
174  {
175  return m_italic;
176  }
177  void SetItalic(bool italic)
178  {
179  m_italic = italic;
180  }
181  bool IsUnderlined()
182  {
183  return m_underlined;
184  }
185  void SetUnderlined(bool underlined)
186  {
187  m_underlined = underlined;
188  }
189  bool IsStrikethrough()
190  {
191  return m_strikethrough;
192  }
193  void SetStrikethrough(bool strikethrough)
194  {
195  m_strikethrough = strikethrough;
196  }
197  unsigned int CodePage()
198  {
199  return m_codepage;
200  }
201  void SetCodePage(unsigned int codepage)
202  {
203  m_codepage = codepage;
204  }
205 
206  unsigned int CharSet()
207  {
208  return m_charset;
209  }
210  void SetCharSet(unsigned int charset, bool setcodepage)
211  {
212  m_charset = charset;
213  if (setcodepage)
214  {
215  m_codepage = ON_MapRTFcharsetToWindowsCodePage(charset, 1252);
216  }
217  }
218 
219  private:
220  double m_height = 1.0;
221  double m_stackscale = 0.7;
222  ON_Color m_color = ON_Color::Black;
224  bool m_bold = false;
225  bool m_italic = false;
226  bool m_underlined = false;
227  bool m_strikethrough = false;
228  unsigned int m_codepage = 1252;
229  unsigned int m_charset = 0; // Charset isn't really needed but is here to make debugging a little easier
230  };
231 
232  ON_ClassArray< TextProps > m_prop_stack;
233  TextProps m_current_props;
234 
235  // Rtf uses UTF-16 encoding and surrogate pairs need to be properly handled.
236  // For example, the single UNICODE code point ON_UnicodeCodePoint::Wastebasket U+1F5D1 (decimal 128465)
237  // is in the RTF string as ...{\ltrch \u-10179?\u-8751?}...
238  // The UNICODE code point U+1F5D1 is encoded as a UTF-16 surrogate pair is (0xD83D, 0xDDD1).
239  // \u-10179? -> unsigned short 0xD83D
240  // \u-8751? -> unsigned short 0xDDD1
241  enum : ON__UINT16
242  {
243  m_UFT16_waiting_mark = 0xEEEE, // value must be > 0xE000 and uncommon unicode code point
244  m_UFT16_unused_mark = 0xFFFF // value must be > m_UFT16_waiting, <= 0xFFFF, and uncommon unicode code point
245  };
246  ON__INT32 m_current_UTF16_buffer_count = 0;
247  ON__UINT16 m_current_UTF16_buffer[2];
249  ON_SimpleArray< ON__UINT32 > m_current_codepoints;
250  ON__INT32 m_in_run;
251  ON__INT32 m_level = 0;
252  ON__INT32 m_font_table_level = -1;
253  ON__INT32 m_font_index = 0;
254  ON__INT32 m_default_font_index = 0;
255  ON_SimpleArray< int > m_ansi_equiv_chars = 0;
256 
257  ON_ClassArray< ON_FaceNameKey > m_facename_map;
258 
259  virtual void InitBuilder(const ON_Font* default_font);
260  virtual void FlushText(size_t count, ON__UINT32* cp_array);
261  virtual void GroupBegin();
262  virtual void GroupEnd();
263 
264  virtual void BeginHeader();
265  virtual void BeginFontTable();
266  virtual void DefaultFont(const wchar_t* value);
267  virtual void FontTag(const wchar_t* value);
268  virtual void FontSize(const wchar_t* value);
269  virtual void CharSet(const wchar_t* value);
270  virtual void CodePage(const wchar_t* value);
271 
272  virtual void Newline();
273  virtual void Paragraph();
274  virtual void ParagraphDefaults();
275  virtual void Section();
276  virtual void Tab();
277 
278  virtual void Bold(const wchar_t* value);
279  virtual void Italic(const wchar_t* value);
280  virtual void UnderlineOn();
281  virtual void UnderlineOff();
282  virtual void Strikethrough(const wchar_t* value);
283 
284  virtual void Superscript();
285  virtual void Subscript();
286  virtual void NoSuperSub();
287 
288  virtual void BeginColorTable();
289  virtual void ColorRed(const wchar_t* value);
290  virtual void ColorGreen(const wchar_t* value);
291  virtual void ColorBlue(const wchar_t* value);
292  virtual void ColorForeground(const wchar_t* value);
293  virtual void ColorBackground(const wchar_t* value);
294 
295  virtual void SetStackScale(const wchar_t* value);
296  virtual void StackFraction(const wchar_t* value);
297  virtual void StackEnd();
298 
299  virtual void TextField(const wchar_t* name);
300 
301  virtual void UniEmbeddedDest(const wchar_t* value);
302  virtual void UniDest(const wchar_t* value);
303 
304  virtual void UniCpCount(const wchar_t* value);
305  virtual void UniDecimal(const wchar_t* value);
306 
307  virtual void LQuote();
308  virtual void RQuote();
309  virtual void LDblQuote();
310  virtual void RDblQuote();
311  virtual void Bullet();
312  virtual void EnDash();
313  virtual void EmDash();
314 
315  virtual bool AppendCodePoint(ON__UINT32 codept);
316 
317  ON__UINT32* RunCodePoints(const ON_TextRun& run);
318 
319  const ON_wString FaceNameFromMap(int nval);
320  unsigned int CodePageFromMap(int nval);
321  unsigned int CharSetFromMap(int nval);
322 
323 private:
324  ON_TextBuilder operator=(const ON_TextBuilder& src);
325 };
327 
328 
329 class ON_TextRunBuilder : public ON_TextBuilder
330 {
331 public:
333  ON_TextContent& text,
334  ON_TextRunArray& runs,
335  const ON_DimStyle* dimstyle,
336  double height,
337  ON_Color color);
339  virtual ~ON_TextRunBuilder();
340 
342  const ON_Font* m_current_font = &ON_Font::Default;
344  ON_TextRun m_current_run;
345  ON_TextRunArray& m_runs;
346  ON_TextContent& m_text;
347 
348  void FinishCurrentRun();
349  void AppendCurrentRun();
350 
351  void InitBuilder(const ON_Font* default_font) override;
352  void FlushText(size_t count, ON__UINT32* cp_array) override;
353  void GroupBegin() override;
354  void GroupEnd() override;
355 
356  void BeginHeader() override;
357  void BeginFontTable() override;
358  void DefaultFont(const wchar_t* value) override;
359  void FontTag(const wchar_t* value) override;
360  void FontSize(const wchar_t* value) override;
361 
362  void Newline() override;
363  void Paragraph() override;
364  void ParagraphDefaults() override;
365  void Section() override;
366  void Tab() override;
367 
368  void Bold(const wchar_t* value) override;
369  void Italic(const wchar_t* value) override;
370  void UnderlineOn() override;
371  void UnderlineOff() override;
372  void Strikethrough(const wchar_t* value) override;
373 
374  void Superscript() override;
375  void Subscript() override;
376  void NoSuperSub() override;
377 
378  void BeginColorTable() override;
379  void ColorRed(const wchar_t* value) override;
380  void ColorGreen(const wchar_t* value) override;
381  void ColorBlue(const wchar_t* value) override;
382  void ColorForeground(const wchar_t* value) override;
383  void ColorBackground(const wchar_t* value) override;
384 
385  void SetStackScale(const wchar_t* value) override;
386  void StackFraction(const wchar_t* value) override;
387  void StackEnd() override;
388 
389  void TextField(const wchar_t* name) override;
390 
391  void UniEmbeddedDest(const wchar_t* value) override;
392  void UniDest(const wchar_t* value) override;
393 
394 private:
395  ON_TextRunBuilder operator=(const ON_TextRunBuilder& src);
396 };
397 
398 class ON_RtfStringBuilder : public ON_TextBuilder
399 {
400 public:
402  const ON_DimStyle* dimstyle,
403  double height,
404  ON_Color color);
405 
406  virtual ~ON_RtfStringBuilder();
407 
408  class TextRun
409  {
410  public:
411  TextRun() {}
412 
413  ON_TextRun::RunType Type() const
414  {
415  return m_run_type;
416  }
417  void SetType(ON_TextRun::RunType type)
418  {
419  m_run_type = type;
420  }
421  void InitRun()
422  {
423  m_run_type = ON_TextRun::RunType::kNone;
424  m_font_index = -1;
425  m_text.Empty();
426  m_bold = false;
427  m_italic = false;
428  m_underlined = false;
429  m_strikethrough = false;
430  }
431  int FontIndex()
432  {
433  return m_font_index;
434  }
435  void SetFontIndex(int index)
436  {
437  if(index >= -1)
438  m_font_index = index;
439  }
440 
441  bool IsBold() const
442  {
443  return m_bold;
444  }
445  bool IsItalic() const
446  {
447  return m_italic;
448  }
449  bool IsUnderlined() const
450  {
451  return m_underlined;
452  }
453  bool IsStrikeThrough() const
454  {
455  return m_strikethrough;
456  }
457  void SetBold(bool b)
458  {
459  m_bold = b;
460  }
461  void SetItalic(bool b)
462  {
463  m_italic = b;
464  }
465  void SetUnderlined(bool b)
466  {
467  m_underlined = b;
468  }
469  void SetStrikeThrough(bool b)
470  {
471  m_strikethrough = b;
472  }
473 
474  void AddControl(const wchar_t* str)
475  {
476  m_text += str;
477  size_t i = wcslen(str);
478  if(str[i-1] == L' ' || str[i-1] == L'{' || str[i-1] == L'}')
479  m_terminated = true;
480  else
481  m_terminated = false;
482  m_has_content = true;
483  }
484 
485  void AddText(const wchar_t* str)
486  {
487  if (!m_terminated)
488  m_text += L' ';
489  m_terminated = true;
490  m_text += str;
491  m_has_content = true;
492  }
493 
494  void AddChar(const wchar_t ch)
495  {
496  if (!m_terminated)
497  m_text += L' ';
498  m_terminated = true;
499  m_text += ch;
500  m_has_content = true;
501  }
502 
503  void SetTerminated(bool terminated)
504  {
505  m_terminated = terminated;
506  }
507 
508  bool IsTerminated()
509  {
510  return m_terminated;
511  }
512 
513  void EmptyText()
514  {
516  }
517 
518  const ON_wString& TextString()
519  {
520  return m_text;
521  }
522 
523  private:
524  bool m_has_content = false;
525  bool m_terminated = true;
526  ON_wString m_text;
527  bool m_bold = false;
528  bool m_italic = false;
529  bool m_underlined = false;
530  bool m_strikethrough = false;
531  int m_font_index = -1;
533  };
534 
535 private:
536  ON_wString m_string_out;
537  bool m_in_font_table = false;
538  bool m_in_color_table = false;
539 
540  bool m_skip_color_tbl = false;
541  bool m_skip_bold = false;
542  bool m_skip_italic = false;
543  bool m_skip_underline = false;
544  bool m_skip_facename = false;
545 
546  bool m_make_bold = false;
547  bool m_make_italic = false;
548  bool m_make_underline = false;
549  bool m_make_facename = false;
550 
551  ON_wString m_default_facename;
552  ON_wString m_override_facename;
553 
554  bool m_have_rtf = false;
556 public:
557 
558  TextRun m_current_run;
559  ON_ClassArray< TextRun > m_run_stack;
560 
561  void InitStringBuilder(const ON_DimStyle* default_style);
562  const ON_wString OutputString();
563  void PushRun(TextRun& run);
564  TextRun PopRun();
565 
566  bool InFontTable();
567  void SetInFontTable(bool b);
568  bool InColorTable();
569  void SetInColorTable(bool b);
570 
571  void SetSkipColorTbl(bool b);
572  void SetSkipBold(bool b);
573  void SetSkipItalic(bool b);
574  void SetSkipUnderline(bool b);
575  void SetSkipFacename(bool b);
576 
577  bool SkipColorTbl();
578  bool SkipBold();
579  bool SkipItalic();
580  bool SkipUnderline();
581  bool SkipFacename();
582 
583  void SetMakeBold(bool b);
584  void SetMakeItalic(bool b);
585  void SetMakeUnderline(bool b);
586  void SetMakeFacename(bool b);
587 
588  bool MakeBold();
589  bool MakeItalic();
590  bool MakeUnderline();
591  bool MakeFacename();
592 
593  bool SkippingFacename();
594  bool SettingFacename();
595 
596  void SetDefaultFacename(const wchar_t* facename);
597  void SetOverrideFacename(const wchar_t* facename);
598 
599  // virtuals
600 
601  void GroupBegin() override;
602  void GroupEnd() override;
603 
604  void BeginHeader() override;
605  void BeginFontTable() override;
606  void DefaultFont(const wchar_t* value) override;
607  void FontTag(const wchar_t* value) override;
608  void FontSize(const wchar_t* value) override;
609 
610  void Newline() override;
611  void Paragraph() override;
612  void ParagraphDefaults() override;
613  void Section() override;
614  void Tab() override;
615 
616  void Bold(const wchar_t* value) override;
617  void Italic(const wchar_t* value) override;
618  void UnderlineOn() override;
619  void UnderlineOff() override;
620  void Strikethrough(const wchar_t* value) override;
621 
622  void Superscript() override;
623  void Subscript() override;
624  void NoSuperSub() override;
625 
626  void BeginColorTable() override;
627  void ColorRed(const wchar_t* value) override;
628  void ColorGreen(const wchar_t* value) override;
629  void ColorBlue(const wchar_t* value) override;
630  void ColorForeground(const wchar_t* value) override;
631  void ColorBackground(const wchar_t* value) override;
632 
633  void TextField(const wchar_t* name) override;
634 
635  bool AppendCodePoint(ON__UINT32 codept) override;
636 
637  void UniEmbeddedDest(const wchar_t* value) override;
638  void UniDecimal(const wchar_t* value) override;
639  void UniDest(const wchar_t* value) override;
640 
641 private:
642  ON_RtfStringBuilder operator=(const ON_RtfStringBuilder& src);
643 };
645 #ifdef RTFFIRSTCHAR
646 
647 class ON_RtfFirstChar : public ON_TextBuilder
648 {
649 public:
651  const ON_DimStyle* dimstyle,
652  double height,
653  ON_Color color);
655  virtual ~ON_RtfFirstChar();
656 
657  class TextRun
658  {
659  public:
660  TextRun() {}
661 
662  ON_TextRun::RunType Type() const
663  {
664  return m_run_type;
665  }
666  void SetType(ON_TextRun::RunType type)
667  {
668  m_run_type = type;
669  }
670  void InitRun()
671  {
672  m_run_type = ON_TextRun::RunType::kNone;
673  m_font_index = -1;
674  m_text.Empty();
675  m_bold = false;
676  m_italic = false;
677  m_underlined = false;
678  m_strikethrough = false;
679  }
680  int FontIndex()
681  {
682  return m_font_index;
683  }
684  void SetFontIndex(int index)
685  {
686  if (index >= -1)
687  m_font_index = index;
688  }
689 
690  bool IsBold() const
691  {
692  return m_bold;
693  }
694  bool IsItalic() const
695  {
696  return m_italic;
697  }
698  bool IsUnderlined() const
699  {
700  return m_underlined;
701  }
702  bool IsStrikeThrough() const
703  {
704  return m_strikethrough;
705  }
706  void SetBold(bool b)
707  {
708  m_bold = b;
709  }
710  void SetItalic(bool b)
711  {
712  m_italic = b;
713  }
714  void SetUnderlined(bool b)
715  {
716  m_underlined = b;
717  }
718  void SetStrikeThrough(bool b)
719  {
720  m_strikethrough = b;
721  }
722 
723  void AddText(const wchar_t* str)
724  {
725  if (!m_terminated)
726  m_text += L' ';
727  m_terminated = true;
728  m_text += str;
729  m_has_content = true;
730  }
731 
732  const ON_wString& Text()
733  {
734  return m_text;
735  }
736 
737  private:
738  bool m_has_content = false;
739  bool m_terminated = true;
740  ON_wString m_text;
741  bool m_bold = false;
742  bool m_italic = false;
743  bool m_underlined = false;
744  bool m_strikethrough = false;
745  int m_font_index = -1;
747  };
748 
749 private:
750  bool m_in_font_table = false;
751  bool m_in_color_table = false;
752 
753  bool m_have_rtf = false;
755 public:
756 
757  TextRun m_current_run;
758  ON_ClassArray< TextRun > m_run_stack;
759 
760  void InitStringBuilder(const ON_DimStyle* default_style);
761  const ON_wString OutputString();
762  void PushRun(TextRun& run);
763  TextRun PopRun();
764 
765  bool InFontTable();
766  void SetInFontTable(bool b);
767  bool InColorTable();
768  void SetInColorTable(bool b);
769 
770  // virtuals
771 
772  void GroupBegin() override;
773  void GroupEnd() override;
774 
775  void BeginHeader() override;
776  void BeginFontTable() override;
777  void BeginColorTable() override;
778  void TextField(const wchar_t* name) override;
779  bool AppendCodePoint(ON__UINT32 codept) override;
780 
781  void FontTag(const wchar_t* value) override;
782 
783  void Bold(const wchar_t* value) override;
784  void Italic(const wchar_t* value) override;
785  void UnderlineOn() override;
786  void UnderlineOff() override;
787  void Strikethrough(const wchar_t* value) override;
788 
789 private:
790  ON_RtfFirstChar operator=(const ON_RtfFirstChar& src);
791 };
793 #endif
794 
795 class ON_RtfParser
796 {
797 public:
799  bool Parse();
800 
801 private:
802  ON__UINT32 Internal_ParseMBCSString(
803  const ON__UINT32 windows_code_page
804  );
805 
806  ON_TextIterator& m_ti;
807 
808  ON_TextBuilder& m_builder;
809  int m_p_level;
810  bool m_in_real_rtf;
811 
812  bool FlushCurText(ON_SimpleArray< ON__UINT32 >& cp_array);
813  bool ReadTag(bool optional);
814  bool ProcessTag(const wchar_t* name, const wchar_t* value, bool optional);
815 
816  ON_RtfParser operator=(const ON_RtfParser& src);
817 };
818 
819 class ON_CLASS RtfComposer
820 {
821 public:
822  class RunInfo
823  {
824  public:
826  ON_TextRun* m_text_run = nullptr;
827  ON_wString m_run_text;
828  bool m_bold = false;
829  bool m_italic = false;
830  bool m_underline = false;
831  bool m_strikeout = false;
832  ON_wString m_facename = L"Arial";
833  int m_facename_key = -1;
834  };
835 
836 
837  static bool ComposeA(
838  const ON_TextContent* text,
839  const ON_DimStyle* dimstyle,
840  ON_wString& rtf);
841 
842  static bool Compose(
843  const ON_TextContent* text,
844  const ON_DimStyle* dimstyle,
845  ON_wString& rtf);
846 
847  static void ComposeRunA(
848  const ON_TextRun* run,
849  const ON_DimStyle* dimstyle,
850  ON_SimpleArray< wchar_t[34] >& fonttable,
851  bool multiline,
852  int& changecount,
853  int& changefont,
854  bool& bold,
855  bool& italic,
856  bool& underlined,
857  RunInfo& runinfo);
858 
859  static void ComposeRun(
860  const ON_TextRun* run,
861  const ON_DimStyle* dimstyle,
862  ON_SimpleArray< wchar_t[34] >& fonttable,
863  bool multiline,
864  int& changecount,
865  int& changefont,
866  int& changecolor,
867  bool& bold,
868  bool& italic,
869  bool& underlined,
870  bool& strikeout,
871  ON_wString& strings_out);
872 
873  static bool RecomposeRTF();
874  static void SetRecomposeRTF(bool b);
875 
876 private:
877  static bool m_bComposeRTF;
878 
879  RtfComposer();
880  static unsigned int GetFacenameKey(const wchar_t* facename, ON_SimpleArray< wchar_t[34] >& fonttable);
881  static unsigned int GetColorKey(ON_Color color, ON_SimpleArray< unsigned int >& colortable);
882  static bool FormatTextHeight(double height, ON_wString& str);
883 };
884 
885 
886 #endif
887 
Definition: opennurbs_textiterator.h:816
Definition: opennurbs_unicode.h:344
Definition: opennurbs_textiterator.h:22
A range of text with all the same attributes.
Definition: opennurbs_textrun.h:66
Definition: opennurbs_textiterator.h:654
Converts wchar_t characters to Unicode codepoints.
Definition: opennurbs_textiterator.h:38
ON_wString m_facename
Definition: opennurbs_textiterator.h:32
stack_format
Format of stacked fractions
Definition: opennurbs_dimensionstyle.h:977
Definition: opennurbs_textiterator.h:644
Definition: opennurbs_textrun.h:363
Definition: opennurbs_textiterator.h:28
Definition: opennurbs_textiterator.h:819
Definition: opennurbs_textiterator.h:792
Definition: opennurbs_string.h:2020
Definition: opennurbs_dimensionstyle.h:218
Definition: opennurbs_color.h:24
Definition: opennurbs_text.h:28
Definition: opennurbs_textiterator.h:103
An ON_Font is a face in a font family. It corresponds to a Windows LOGFONT, a .NET System...
Definition: opennurbs_font.h:225
RunType
Definition: opennurbs_textrun.h:122
Definition: opennurbs_textiterator.h:96
Definition: opennurbs_textiterator.h:405
const ON_Font * managed_font
Definition: opennurbs_textiterator.h:25
int rtf_font_index
Definition: opennurbs_textiterator.h:24
Definition: opennurbs_array.h:409
static const ON_wString EmptyString
Definition: opennurbs_string.h:2026
static const ON_Font Default
Definition: opennurbs_font.h:502
Definition: opennurbs_textiterator.h:395
Definition: opennurbs_textiterator.h:326
static const ON_Color Black
Definition: opennurbs_color.h:33