@@ -89,10 +89,9 @@ def _draw_device_front(self, drawing, device, start, end, text):
8989 )
9090 link .set_desc (self ._get_device_description (device ))
9191 link .add (drawing .rect (start , end , style = 'fill: #{}' .format (color ), class_ = 'slot' ))
92- hex_color = '#{}' .format (foreground_color (color ))
93- link .add (drawing .text (str (name ), insert = text , fill = hex_color ))
9492
9593 # Embed front device type image if one exists
94+ text_color = '#{}' .format (foreground_color (color ))
9695 if self .include_images and device .device_type .front_image :
9796 image = drawing .image (
9897 href = device .device_type .front_image .url ,
@@ -102,12 +101,16 @@ def _draw_device_front(self, drawing, device, start, end, text):
102101 )
103102 image .fit (scale = 'slice' )
104103 link .add (image )
104+ link .add (drawing .text (str (name ), insert = text , stroke = '#{}' .format (color ),
105+ stroke_width = '0.2em' , stroke_linejoin = 'round' ))
106+ link .add (drawing .text (str (name ), insert = text , fill = text_color ))
107+ else :
108+ link .add (drawing .text (str (name ), insert = text , fill = text_color ))
105109
106110 def _draw_device_rear (self , drawing , device , start , end , text ):
107111 rect = drawing .rect (start , end , class_ = "slot blocked" )
108112 rect .set_desc (self ._get_device_description (device ))
109113 drawing .add (rect )
110- drawing .add (drawing .text (str (device ), insert = text ))
111114
112115 # Embed rear device type image if one exists
113116 if self .include_images and device .device_type .rear_image :
@@ -120,6 +123,10 @@ def _draw_device_rear(self, drawing, device, start, end, text):
120123 image .fit (scale = 'slice' )
121124 drawing .add (image )
122125
126+ drawing .add (drawing .text (str (device ), insert = text , stroke = 'white' ,
127+ stroke_width = '0.2em' , stroke_linejoin = 'round' ))
128+ drawing .add (drawing .text (str (device ), insert = text ))
129+
123130 @staticmethod
124131 def _draw_empty (drawing , rack , start , end , text , id_ , face_id , class_ , reservation ):
125132 link = drawing .add (
0 commit comments