Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various examples need their font sizes adjusted post-cosmic-text #14265

Closed
rparrett opened this issue Jul 10, 2024 · 2 comments · Fixed by #15190
Closed

Various examples need their font sizes adjusted post-cosmic-text #14265

rparrett opened this issue Jul 10, 2024 · 2 comments · Fixed by #15190
Labels
A-Text Rendering and layout for characters C-Bug An unexpected or incorrect behavior C-Examples An addition or correction to our examples S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it!
Milestone

Comments

@rparrett
Copy link
Contributor

Bevy version

main, after #10193

Additional information

See this run from bevy-example-runner:
https://pixel-eagle.com/project/b25a040a-a980-4602-b90c-d480ab84076d/run/3207/compare/3196?screenshot=UI%20(User%20Interface)/transparency_ui.png

Bevy's default font size and a few examples were updated to compensate, but some examples where the a font size other than the default was specified now may need to be updated.

Dividing the font size by 1.2 and rounding to the nearest whole number will give rendered text roughly the same size as before.

One of the more obvious examples is transparency_ui, where the text no longer fits on one line:

image

We should

  • look through the Pixel Eagle report
  • note examples where the font size has significantly changed
  • make a judgment about whether to
    • divide the specified font size by 1.2ish.
    • OR, modify the example to use the default text size (and possibly color) instead.
      There are various examples where we probably should be using the default values but we are not. e.g. low_power.
@rparrett rparrett added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Jul 10, 2024
@janhohenheim janhohenheim added C-Examples An addition or correction to our examples S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it! A-Text Rendering and layout for characters and removed S-Needs-Triage This issue needs to be labelled labels Jul 10, 2024
@janhohenheim janhohenheim added this to the 0.15 milestone Jul 10, 2024
@tjlaxs
Copy link
Contributor

tjlaxs commented Sep 13, 2024

I might take this one, unless somebody is in the mid of implementation.

@tjlaxs
Copy link
Contributor

tjlaxs commented Sep 13, 2024

Trying to create a list of all the examples.

examples

  • hello_world

2d

  • bloom_2d
  • move_sprite
  • 2d_viewport_to_world
  • rotation
  • mesh2d
  • mesh2d_arcs
  • mesh2d_manual
  • mesh2d_vertex_color_texture
  • 2d_shapes
  • custom_gltf_vertex_attribute
  • sprite
  • sprite_animation
  • sprite_flipping
  • sprite_sheet
  • sprite_tile
  • sprite_slice
  • text2d
  • texture_atlas
  • transparency_2d
  • mesh2d_alpha_mode
  • pixel_grid_snap
  • bounding_2d
  • wireframe_2d

ui

  • borders
  • button
  • display_and_visibility
  • window_fallthrough
  • font_atlas_debug
  • overflow
  • overflow_debug
  • relative_cursor_position
  • render_ui_to_texture
  • size_constraints
  • text
  • text_debug
  • flex_layout
  • text_wrap_debug
  • grid
  • transparency_ui
  • z_index
  • ui
  • ui_scaling
  • ui_texture_atlas
  • ui_texture_slice
  • ui_texture_slice_flip_and_tile
  • ui_texture_atlas_slice
  • viewport_debug

window

  • clear_color
  • custom_user_event
  • low_power
  • multiple_windows
  • scale_factor_override
  • screenshot
  • transparent_window
  • window_settings
  • window_resizing
  • monitor_info

ecs

  • ecs_guide
  • change_detection
  • component_hooks
  • custom_schedule
  • custom_query_param
  • dynamic
  • event
  • send_and_receive_events
  • fixed_timestep
  • generic_system
  • hierarchy
  • iter_combinations
  • one_shot_systems
  • parallel_query
  • removal_detection
  • run_conditions
  • startup_system
  • system_piping
  • system_closure
  • system_param
  • system_stepping
  • nondeterministic_system_order
  • observers
  • observer_propagation

transforms

  • 3d_rotation
  • align
  • scale
  • transform
  • translation

time

  • time
  • virtual_time
  • timers

games

  • alien_cake_addict
  • breakout
  • contributors
  • desk_toy
  • game_menu
  • loading_screen

input

  • char_input_events
  • gamepad_input
  • gamepad_input_events
  • gamepad_rumble
  • keyboard_input
  • keyboard_modifiers
  • keyboard_input_events
  • mouse_input
  • mouse_input_events
  • mouse_grab
  • touch_input
  • touch_input_events
  • text_input

reflection

  • reflection
  • custom_attributes
  • dynamic_types
  • function_reflection
  • generic_reflection
  • reflection_types
  • type_data

scene

  • scene

shader

  • custom_vertex_attribute
  • custom_post_processing
  • custom_phase_item
  • shader_defs
  • shader_material
  • shader_material_2d
  • extended_material
  • shader_prepass
  • shader_material_screenspace_texture
  • shader_material_glsl
  • shader_instancing
  • animate_shader
  • compute_shader_game_of_life
  • gpu_readback
  • array_texture
  • texture_binding_array
  • storage_buffer
  • specialized_mesh_pipeline

stress_tests

  • bevymark
  • many_animated_sprites
  • many_buttons
  • many_cubes
  • many_gizmos
  • many_foxes
  • many_glyphs
  • many_lights
  • many_sprites
  • transform_hierarchy
  • text_pipeline

math

  • cubic_splines
  • render_primitives
  • sampling_primitives
  • custom_primitives
  • random_sampling

movement

  • smooth_follow
  • physics_in_fixed_timestep

gizmos

  • 2d_gizmos
  • 3d_gizmos
  • axes
  • light_gizmos

tools

  • scene_viewer
  • gamepad_viewer

dev_tools

  • fps_overlay

camera

  • 2d_top_down_camera
  • first_person_view_model
  • projection_zoom
  • camera_orbit

3d

  • 3d_scene
  • 3d_shapes
  • 3d_viewport_to_world
  • animated_material
  • generate_custom_mesh
  • anti_aliasing
  • atmospheric_fog
  • fog
  • auto_exposure
  • blend_modes
  • lighting
  • lines
  • ssao
  • spotlight
  • bloom_3d
  • deferred_rendering
  • load_gltf
  • load_gltf_extras
  • motion_blur
  • tonemapping
  • orthographic
  • parenting
  • pbr
  • parallax_mapping
  • render_to_texture
  • shadow_biases
  • shadow_caster_receiver
  • skybox
  • spherical_area_lights
  • split_screen
  • texture
  • transparency_3d
  • transmission
  • two_passes
  • update_gltf_scene
  • vertex_colors
  • wireframe
  • irradiance_volumes
  • meshlet
  • lightmaps
  • visibility_range
  • ssr
  • color_grading
  • clearcoat
  • depth_of_field
  • volumetric_fog
  • anisotropy
  • fog_volumes
  • scrolling_fog
  • post_processing
  • rotate_environment_map
  • reflection_probes

picking

  • simple_picking
  • sprite_picking

animation

  • animated_fox
  • animation_graph
  • morph_targets
  • animated_transform
  • color_animation
  • cubic_curve
  • custom_skinned_mesh
  • gltf_skinned_mesh
  • animation_masks

app

  • custom_loop
  • drag_and_drop
  • empty
  • empty_defaults
  • headless
  • logs
  • log_layers
  • log_layers_ecs
  • plugin
  • plugin_group
  • return_after_run
  • thread_pool_resources
  • no_renderer
  • headless_renderer
  • without_winit

asset

  • asset_loading
  • asset_settings
  • asset_decompression
  • custom_asset
  • custom_asset_reader
  • embedded_asset
  • extra_asset_source
  • hot_asset_reloading
  • asset_processing
  • repeated_texture
  • multi_asset_sync

async_tasks

  • async_compute
  • external_source_external_thread

audio

  • audio
  • audio_control
  • decodable
  • soundtrack
  • spatial_audio_2d
  • spatial_audio_3d
  • pitch

diagnostics

  • log_diagnostics
  • custom_diagnostic
  • enabling_disabling_diagnostic

states

  • states
  • sub_states
  • computed_states
  • custom_transitions

github-merge-queue bot pushed a commit that referenced this issue Sep 16, 2024
# Objective

- Fixes #14265

## Solution

- Go through Pixel Eagle examples (and examples all in all)
- If default size is used it is usually left there
- If size of font is touched try dividing with 1.2 and round it to
nearest whole number

## Testing

- Run example before and after
- Make sure examples text are readable or like before cosmic-text change

---

## Showcase

Before:

![image](https:/user-attachments/assets/beb2d5af-d1ee-4c2c-89c4-8e59c53b53b4)

After:

![image](https:/user-attachments/assets/fef28a8d-dc26-4e0e-9870-6b216de906e8)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Text Rendering and layout for characters C-Bug An unexpected or incorrect behavior C-Examples An addition or correction to our examples S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants