+ cond = &cmd->body.cond;
+ cond->cmd_ids[i] = this_id;
+ if (this_id <= CMD_ID_OFFSET_INDEX)
+ {
+ FontLayoutCmd *this_cmd
+ = stage->cmds + CMD_ID_TO_INDEX (this_id);
+
+ if (this_cmd->type == FontLayoutCmdTypeRule
+ && this_cmd->body.rule.src_type == SRC_SEQ)
+ {
+ int first_char = this_cmd->body.rule.src.seq.codes[0];
+
+ if (cond->seq_beg < 0)
+ {
+ /* The first SEQ command. */
+ cond->seq_beg = i;
+ cond->seq_from = cond->seq_to = first_char;
+ }
+ else if (cond->seq_end < 0)
+ {
+ /* The following SEQ command. */
+ if (cond->seq_from > first_char)
+ cond->seq_from = first_char;
+ else if (cond->seq_to < first_char)
+ cond->seq_to = first_char;
+ }
+ }
+ else
+ {
+ if (cond->seq_beg >= 0 && cond->seq_end < 0)
+ /* The previous one is the last SEQ command. */
+ cond->seq_end = i;
+ }
+ }
+ else
+ {
+ if (cond->seq_beg >= 0 && cond->seq_end < 0)
+ /* The previous one is the last SEQ command. */
+ cond->seq_end = i;
+ }