- entries in the list are inserted in random order.
- I don't think it's worth the effort to implement a more effective
- datastructure, because the number of different fonts in a paragraph
- is limited. (Asger)
- Nevertheless, I decided to store fontlist using a sorted vector:
- fontlist = { {pos_1,font_1} , {pos_2,font_2} , ... } where
- pos_1 < pos_2 < ..., font_{i-1} != font_i for all i,
- and font_i covers the chars in positions pos_{i-1}+1,...,pos_i
- (font_1 covers the chars 0,...,pos_1) (Dekel)
+ entries in the list are inserted in random order.
+ I don't think it's worth the effort to implement a more effective
+ datastructure, because the number of different fonts in a paragraph
+ is limited. (Asger)
+ Nevertheless, I decided to store fontlist using a sorted vector:
+ fontlist = { {pos_1,font_1} , {pos_2,font_2} , ... } where
+ pos_1 < pos_2 < ..., font_{i-1} != font_i for all i,
+ and font_i covers the chars in positions pos_{i-1}+1,...,pos_i
+ (font_1 covers the chars 0,...,pos_1) (Dekel)