@@ -267,22 +267,24 @@ fn svg_to_bytes(
267267 }
268268 } ;
269269
270- if !cfg ! ( any( target_os ="windows" , target_os="macos" ) ) {
270+ #[ cfg( any( target_os = "windows" , target_os = "macos" ) ) ]
271+ {
271272 font_family = none_or_take ( font_family, "Times New Roman" ) ;
272273 serif_family = none_or_take ( serif_family, "Times New Roman" ) ;
273274 sans_serif_family = none_or_take ( sans_serif_family, "Arial" ) ;
274275 cursive_family = none_or_take ( cursive_family, "Comic Sans MS" ) ;
275276 fantasy_family = none_or_take ( fantasy_family, "Impact" ) ;
276277 monospace_family = none_or_take ( monospace_family, "Courier New" ) ;
277- } else if cfg ! ( target_os="linux" ) {
278+ }
279+
280+ #[ cfg( target_os="linux" ) ]
281+ {
278282 font_family = none_or_take ( font_family, "Liberation Serif" ) ;
279283 serif_family = none_or_take ( serif_family, "Liberation Serif" ) ;
280284 sans_serif_family = none_or_take ( sans_serif_family, "Liberation Sans" ) ;
281285 cursive_family = none_or_take ( cursive_family, "Comic Neue" ) ;
282286 fantasy_family = none_or_take ( fantasy_family, "Anton" ) ;
283287 monospace_family = none_or_take ( monospace_family, "Liberation Mono" ) ;
284- } else {
285- panic ! ( "Unsupported operating system" )
286288 }
287289
288290 let mut _svg_string = String :: new ( ) ;
0 commit comments