Skip to content

Commit

Permalink
refactor: update font and adjust text positioning in utils
Browse files Browse the repository at this point in the history
The changes update the font used for descriptions from "RethinkSans-SemiBold.ttf" to "LondrinaSolid-Light.ttf" and adjust the font size from 40 to 50 for better readability. They also adjust the positioning values for the title and the description to align better with the new font. Finally, the domain name line has been removed from the sequence, this might be due to redundancy or a design decision.
  • Loading branch information
nekofar committed Jun 16, 2024
1 parent b0a7c53 commit 54b8f3f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ pub fn create_og_image(title: &str, description: &str, platform: Platform) -> St
);

let description_encoded = format!(
"/l_text:{}_40:{},{},c_fit,w_1050",
utf8_percent_encode("RethinkSans-SemiBold.ttf", NON_ALPHANUMERIC),
"/l_text:{}_50:{},{},c_fit,w_1050",
utf8_percent_encode("LondrinaSolid-Light.ttf", NON_ALPHANUMERIC),
utf8_percent_encode(&description, NON_ALPHANUMERIC),
&foreground_color
);
Expand All @@ -115,11 +115,9 @@ pub fn create_og_image(title: &str, description: &str, platform: Platform) -> St
&logo_image,
"/c_scale,w_250/e_screen,fl_layer_apply,g_north_west,x_70,y_70",
&title_encoded,
"/fl_layer_apply,g_north_west,x_70,y_180",
"/fl_layer_apply,g_north_west,x_70,y_220",
&description_encoded,
"/fl_layer_apply,g_north_west,x_70,y_345",
&domain_name_formatted,
"/fl_layer_apply,g_north_west,x_70,y_530",
"/f_auto,q_auto:eco",
"/blank.png",
];
Expand Down

0 comments on commit 54b8f3f

Please sign in to comment.