Font Operators

bpy.ops.font.case_set(*, case='LOWER')

Set font case

Parameters:

case (Literal['LOWER', 'UPPER']) – Case, Lower or upper case (optional)

Returns:

Result of the operator call.

Return type:

set[Literal[Operator Return Items]]

bpy.ops.font.case_toggle()

Toggle font case

Returns:

Result of the operator call.

Return type:

set[Literal[Operator Return Items]]

bpy.ops.font.change_character(*, delta=1)

Change font character code

Parameters:

delta (int) – Delta, Number to increase or decrease character code with (in [-255, 255], optional)

Returns:

Result of the operator call.

Return type:

set[Literal[Operator Return Items]]

bpy.ops.font.change_spacing(*, delta=1.0)

Change font spacing

Parameters:

delta (float) – Delta, Amount to decrease or increase character spacing with (in [-inf, inf], optional)

Returns:

Result of the operator call.

Return type:

set[Literal[Operator Return Items]]

bpy.ops.font.delete(*, type='PREVIOUS_CHARACTER')

Delete text by cursor position

Parameters:

type (Literal['NEXT_CHARACTER', 'PREVIOUS_CHARACTER', 'NEXT_WORD', 'PREVIOUS_WORD', 'SELECTION', 'NEXT_OR_SELECTION', 'PREVIOUS_OR_SELECTION']) – Type, Which part of the text to delete (optional)

Returns:

Result of the operator call.

Return type:

set[Literal[Operator Return Items]]

bpy.ops.font.line_break()

Insert line break at cursor position

Returns:

Result of the operator call.

Return type:

set[Literal[Operator Return Items]]

bpy.ops.font.move(*, type='LINE_BEGIN')

Move cursor to position type

Parameters:

type (Literal['LINE_BEGIN', 'LINE_END', 'TEXT_BEGIN', 'TEXT_END', 'PREVIOUS_CHARACTER', 'NEXT_CHARACTER', 'PREVIOUS_WORD', 'NEXT_WORD', 'PREVIOUS_LINE', 'NEXT_LINE', 'PREVIOUS_PAGE', 'NEXT_PAGE']) – Type, Where to move cursor to (optional)

Returns:

Result of the operator call.

Return type:

set[Literal[Operator Return Items]]

bpy.ops.font.move_select(*, type='LINE_BEGIN')

Move the cursor while selecting

Parameters:

type (Literal['LINE_BEGIN', 'LINE_END', 'TEXT_BEGIN', 'TEXT_END', 'PREVIOUS_CHARACTER', 'NEXT_CHARACTER', 'PREVIOUS_WORD', 'NEXT_WORD', 'PREVIOUS_LINE', 'NEXT_LINE', 'PREVIOUS_PAGE', 'NEXT_PAGE']) – Type, Where to move cursor to, to make a selection (optional)

Returns:

Result of the operator call.

Return type:

set[Literal[Operator Return Items]]

bpy.ops.font.open(*, filepath='', hide_props_region=True, check_existing=False, filter_blender=False, filter_backup=False, filter_image=False, filter_movie=False, filter_python=False, filter_font=True, filter_sound=False, filter_text=False, filter_archive=False, filter_btx=False, filter_alembic=False, filter_usd=False, filter_obj=False, filter_volume=False, filter_folder=True, filter_blenlib=False, filemode=9, relative_path=True, display_type='THUMBNAIL', sort_method='')

Load a new font from a file

Parameters:
  • filepath (str) – File Path, Path to file (optional, never None)

  • hide_props_region (bool) – Hide Operator Properties, Collapse the region displaying the operator settings (optional)

  • check_existing (bool) – Check Existing, Check and warn on overwriting existing files (optional)

  • filter_blender (bool) – Filter .blend files, (optional)

  • filter_backup (bool) – Filter backup .blend files, (optional)

  • filter_image (bool) – Filter image files, (optional)

  • filter_movie (bool) – Filter movie files, (optional)

  • filter_python (bool) – Filter Python files, (optional)

  • filter_font (bool) – Filter font files, (optional)

  • filter_sound (bool) – Filter sound files, (optional)

  • filter_text (bool) – Filter text files, (optional)

  • filter_archive (bool) – Filter archive files, (optional)

  • filter_btx (bool) – Filter btx files, (optional)

  • filter_alembic (bool) – Filter Alembic files, (optional)

  • filter_usd (bool) – Filter USD files, (optional)

  • filter_obj (bool) – Filter OBJ files, (optional)

  • filter_volume (bool) – Filter OpenVDB volume files, (optional)

  • filter_folder (bool) – Filter folders, (optional)

  • filter_blenlib (bool) – Filter Blender IDs, (optional)

  • filemode (int) – File Browser Mode, The setting for the file browser mode to load a .blend file, a library or a special file (in [1, 9], optional)

  • relative_path (bool) – Relative Path, Select the file relative to the blend file (optional)

  • display_type (Literal['DEFAULT', 'LIST_VERTICAL', 'LIST_HORIZONTAL', 'THUMBNAIL']) –

    Display Type, (optional)

    • DEFAULT Default – Automatically determine display type for files.

    • LIST_VERTICAL Short List – Display files as short list.

    • LIST_HORIZONTAL Long List – Display files as a detailed list.

    • THUMBNAIL Thumbnails – Display files as thumbnails.

  • sort_method (str) – File sorting mode, (optional)

Returns:

Result of the operator call.

Return type:

set[Literal[Operator Return Items]]

bpy.ops.font.select_all()

Select all text

Returns:

Result of the operator call.

Return type:

set[Literal[Operator Return Items]]

bpy.ops.font.select_word()

Select word under cursor

Returns:

Result of the operator call.

Return type:

set[Literal[Operator Return Items]]

bpy.ops.font.selection_set()

Set cursor selection

Returns:

Result of the operator call.

Return type:

set[Literal[Operator Return Items]]

bpy.ops.font.style_set(*, style='BOLD', clear=False)

Set font style

Parameters:
  • style (Literal['BOLD', 'ITALIC', 'UNDERLINE', 'SMALL_CAPS']) – Style, Style to set selection to (optional)

  • clear (bool) – Clear, Clear style rather than setting it (optional)

Returns:

Result of the operator call.

Return type:

set[Literal[Operator Return Items]]

bpy.ops.font.style_toggle(*, style='BOLD')

Toggle font style

Parameters:

style (Literal['BOLD', 'ITALIC', 'UNDERLINE', 'SMALL_CAPS']) – Style, Style to set selection to (optional)

Returns:

Result of the operator call.

Return type:

set[Literal[Operator Return Items]]

bpy.ops.font.text_copy()

Copy selected text to clipboard

Returns:

Result of the operator call.

Return type:

set[Literal[Operator Return Items]]

bpy.ops.font.text_cut()

Cut selected text to clipboard

Returns:

Result of the operator call.

Return type:

set[Literal[Operator Return Items]]

bpy.ops.font.text_insert(*, text='', accent=False)

Insert text at cursor position

Parameters:
  • text (str) – Text, Text to insert at the cursor position (optional, never None)

  • accent (bool) – Accent Mode, Next typed character will strike through previous, for special character input (optional)

Returns:

Result of the operator call.

Return type:

set[Literal[Operator Return Items]]

bpy.ops.font.text_insert_unicode()

Insert Unicode Character

Returns:

Result of the operator call.

Return type:

set[Literal[Operator Return Items]]

bpy.ops.font.text_paste(*, selection=False)

Paste text from clipboard

Parameters:

selection (bool) – Selection, Paste text selected elsewhere rather than copied (X11/Wayland only) (optional)

Returns:

Result of the operator call.

Return type:

set[Literal[Operator Return Items]]

bpy.ops.font.text_paste_from_file(*, filepath='', hide_props_region=True, check_existing=False, filter_blender=False, filter_backup=False, filter_image=False, filter_movie=False, filter_python=False, filter_font=False, filter_sound=False, filter_text=True, filter_archive=False, filter_btx=False, filter_alembic=False, filter_usd=False, filter_obj=False, filter_volume=False, filter_folder=True, filter_blenlib=False, filemode=9, display_type='DEFAULT', sort_method='')

Paste contents from file

Parameters:
  • filepath (str) – File Path, Path to file (optional, never None)

  • hide_props_region (bool) – Hide Operator Properties, Collapse the region displaying the operator settings (optional)

  • check_existing (bool) – Check Existing, Check and warn on overwriting existing files (optional)

  • filter_blender (bool) – Filter .blend files, (optional)

  • filter_backup (bool) – Filter backup .blend files, (optional)

  • filter_image (bool) – Filter image files, (optional)

  • filter_movie (bool) – Filter movie files, (optional)

  • filter_python (bool) – Filter Python files, (optional)

  • filter_font (bool) – Filter font files, (optional)

  • filter_sound (bool) – Filter sound files, (optional)

  • filter_text (bool) – Filter text files, (optional)

  • filter_archive (bool) – Filter archive files, (optional)

  • filter_btx (bool) – Filter btx files, (optional)

  • filter_alembic (bool) – Filter Alembic files, (optional)

  • filter_usd (bool) – Filter USD files, (optional)

  • filter_obj (bool) – Filter OBJ files, (optional)

  • filter_volume (bool) – Filter OpenVDB volume files, (optional)

  • filter_folder (bool) – Filter folders, (optional)

  • filter_blenlib (bool) – Filter Blender IDs, (optional)

  • filemode (int) – File Browser Mode, The setting for the file browser mode to load a .blend file, a library or a special file (in [1, 9], optional)

  • display_type (Literal['DEFAULT', 'LIST_VERTICAL', 'LIST_HORIZONTAL', 'THUMBNAIL']) –

    Display Type, (optional)

    • DEFAULT Default – Automatically determine display type for files.

    • LIST_VERTICAL Short List – Display files as short list.

    • LIST_HORIZONTAL Long List – Display files as a detailed list.

    • THUMBNAIL Thumbnails – Display files as thumbnails.

  • sort_method (str) – File sorting mode, (optional)

Returns:

Result of the operator call.

Return type:

set[Literal[Operator Return Items]]

bpy.ops.font.textbox_add()

Add a new text box

Returns:

Result of the operator call.

Return type:

set[Literal[Operator Return Items]]

bpy.ops.font.textbox_remove(*, index=0)

Remove the text box

Parameters:

index (int) – Index, The current text box (in [0, inf], optional)

Returns:

Result of the operator call.

Return type:

set[Literal[Operator Return Items]]

Unlink active font data-block

Returns:

Result of the operator call.

Return type:

set[Literal[Operator Return Items]]