File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed
editor/src/messages/portfolio/document/graph_operation Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -263,6 +263,8 @@ impl<'a> ModifyInputsContext<'a> {
263263 Some ( NodeInput :: value ( TaggedValue :: F64 ( typesetting. max_height . unwrap_or ( 100. ) ) , false ) ) ,
264264 Some ( NodeInput :: value ( TaggedValue :: F64 ( typesetting. tilt ) , false ) ) ,
265265 Some ( NodeInput :: value ( TaggedValue :: TextAlign ( typesetting. align ) , false ) ) ,
266+ Some ( NodeInput :: value ( TaggedValue :: Bool ( false ) , false ) ) , // separate_glyph_elements
267+ Some ( NodeInput :: value ( TaggedValue :: Bool ( typesetting. hyphenate ) , false ) ) ,
266268 ] ) ;
267269 let transform = resolve_network_node_type ( "Transform" ) . expect ( "Transform node does not exist" ) . default_node_template ( ) ;
268270 let stroke = resolve_proto_node_type ( graphene_std:: vector_nodes:: stroke:: IDENTIFIER )
Original file line number Diff line number Diff line change @@ -59,9 +59,9 @@ fn text<'i: 'n>(
5959 /// To have an effect on a single line of text, *Max Width* must be set.
6060 #[ widget( ParsedWidgetOverride :: Custom = "text_align" ) ]
6161 align : TextAlign ,
62- hyphenate : bool ,
6362 /// Whether to split every letterform into its own vector path element. Otherwise, a single compound path is produced.
6463 separate_glyph_elements : bool ,
64+ hyphenate : bool ,
6565) -> Table < Vector > {
6666 let typesetting = TypesettingConfig {
6767 font_size : size,
Original file line number Diff line number Diff line change @@ -15,13 +15,18 @@ thread_local! {
1515 static THREAD_TEXT : RefCell <TextContext > = RefCell :: new( TextContext :: default ( ) ) ;
1616}
1717
18- static EN_US_DICT : OnceLock < Standard > = OnceLock :: new ( ) ;
18+ static EN_US_DICT : OnceLock < Option < Standard > > = OnceLock :: new ( ) ;
1919
2020fn get_dict_for_language ( lang : Language ) -> Option < & ' static Standard > {
2121 match lang {
2222 Language :: EnglishUS | Language :: EnglishGB => EN_US_DICT
23- . get_or_init ( || Standard :: from_embedded ( Language :: EnglishUS ) . expect ( "embed_all feature must be enabled" ) )
24- . into ( ) ,
23+ . get_or_init ( || {
24+ Standard :: from_embedded ( Language :: EnglishUS ) . map_err ( |err| {
25+ log:: error!( "Failed to load hyphenation dictionary: {err}" ) ;
26+ err
27+ } ) . ok ( )
28+ } )
29+ . as_ref ( ) ,
2530 _ => None ,
2631 }
2732}
You can’t perform that action at this time.
0 commit comments