diff --git a/voxygen/src/hud/minimap.rs b/voxygen/src/hud/minimap.rs index 894d39cfb6..804efc933d 100644 --- a/voxygen/src/hud/minimap.rs +++ b/voxygen/src/hud/minimap.rs @@ -331,13 +331,26 @@ impl<'a> Widget for MiniMap<'a> { // TODO: Subregion name display // Title - match self.client.current_chunk() { - Some(chunk) => Text::new(chunk.meta().name()) - .mid_top_with_margin_on(state.ids.mmap_frame, 2.0) - .font_size(self.fonts.cyri.scale(18)) + + match self.client.current_chunk() { + Some(chunk) => + { + // Count characters in the name to avoid clipping with the name display + let name_len = chunk.meta().name().chars().count(); + Text::new(chunk.meta().name()) + .mid_top_with_margin_on(state.ids.mmap_frame, match name_len { + 16..=30 => 4.0, + _ => 2.0, + }) + .font_size(self.fonts.cyri.scale( + match name_len { + 0..=16 => 18, + 16..=30 => 14, + _ => 14, + })) .font_id(self.fonts.cyri.conrod_id) .color(TEXT_COLOR) - .set(state.ids.mmap_location, ui), + .set(state.ids.mmap_location, ui)}, None => Text::new(" ") .mid_top_with_margin_on(state.ids.mmap_frame, 0.0) .font_size(self.fonts.cyri.scale(18))