Decides a text layout instruction
(chr: char, font_id: FontId, string: DecodeString)
| 1400 | /// Decides a text layout instruction |
| 1401 | /// |
| 1402 | fn decode_font_op_layout(chr: char, font_id: FontId, string: DecodeString) -> Result<(DecoderState, Option<Draw>), DecoderError>{ |
| 1403 | let string = string.decode(chr)?; |
| 1404 | |
| 1405 | if string.ready() { |
| 1406 | let string = string.to_string()?; |
| 1407 | Ok((DecoderState::None, Some(Draw::Font(font_id, FontOp::LayoutText(string))))) |
| 1408 | } else { |
| 1409 | Ok((DecoderState::FontOpLayoutText(font_id, string), None)) |
| 1410 | } |
| 1411 | } |
| 1412 | |
| 1413 | /// |
| 1414 | /// Decides a text layout instruction |