Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typography problems #184

Open
masoudnkh opened this issue Mar 11, 2024 · 0 comments
Open

typography problems #184

masoudnkh opened this issue Mar 11, 2024 · 0 comments

Comments

@masoudnkh
Copy link

masoudnkh commented Mar 11, 2024

in typography field have some options to select font and can add font family by use this code:
`if( ! function_exists( 'my_custom_font_family' ) ) {

function my_custom_font_family( $fonts ) {

//
// Adding new icons
$fonts['Ubuntu'] = array( 'normal' );
$fonts['Gotham'] = array( '100', 'normal', 'italic', '700' );
$fonts['MyFont'] = array( '300', 'normal', 'italic', '700', '700italic' );

return $fonts;

}
add_filter( 'csf_field_typography_customwebfonts', 'my_custom_font_family' );
}by this code only can add font family and every text between $fonts[] show for name of font and value. how to change this to have option that can specify display name of font in font selector dropdown and specify value of font family use like this?:$fonts['Ubuntu Font'] => $fonts['Ubuntu'] = array( 'normal' );`
Show Ubuntu Font in dropdown and use value for preview section and output.
Sorry for bad english

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant