Lines Matching full:fallback

6 # The generated table maps complex characters to their simpler fallback forms
10 # python3 gen_ucs_fallback_table.py # Generate fallback tables
37 """Generate a fallback map using unidecode for all relevant Unicode points."""
71 # In a terminal fallback context, we need a single character rather than multiple
194 # Special exclusions with fallback value of 0
211 """Organize the fallback mappings by their high byte (page)."""
214 for code, fallback in fallback_map.items():
215 # Skip characters with fallback value of 0 (excluded characters)
216 if fallback == 0:
221 page_groups[page].append((offset, fallback))
230 """Compress consecutive entries with the same fallback character into ranges.
239 start_offset, fallback = entries[i]
241 # Look ahead to find consecutive entries with the same fallback
245 entries[j][1] == fallback): # same fallback
255 compressed_entries.append((end_offset, fallback))
275 """Generate the fallback character tables."""
276 # Generate fallback map using unidecode
278 print(f"Generated {len(fallback_map)} total fallback mappings")
294 * {out_file} - Unicode character fallback table
302 * to simpler fallback characters for terminal display when corresponding
334 for i, (offset, fallback) in enumerate(entries):
337 fallback_hex = f"0x{fallback:02X}"
342 if fallback == RANGE_MARKER:
345 comment = f"{cp_name(codepoint)} -> '{chr(fallback)}'"
346 f.write(f"\t{{ 0x{offset:02X}, 0x{fallback:02X} }}, /* {comment} */\n")
355 parser = argparse.ArgumentParser(description="Generate Unicode fallback character tables")