fontNames
option is to tell Summernote what to display in fontFamily dropdown.
However, Summernote tests font in fontNames before adding them to
dropdown. This is problem while using web fonts. It’s not easy picking
up nice time to check availabilities of web fonts. You can define a
list for web fonts to be ignored with fontNamesIgnoreCheck
.
Ref: http://summernote.org/deep-dive/#initialization-options
So, you probably need to add fontNamesIgnoreCheck
option, too.
fontNames: [ 'Serif', 'Sans', 'Arial', 'Arial Black', 'Courier', 'Courier New', 'Comic Sans MS', 'Helvetica', 'Impact', 'Lucida Grande', 'Sacramento'],
fontNamesIgnoreCheck: [ 'Serif', 'Sans', 'Arial', 'Arial Black', 'Courier', 'Courier New', 'Comic Sans MS', 'Helvetica', 'Impact', 'Lucida Grande', 'Sacramento'],
Summernote also checks current font-family and font-size of your browser to initialize default font-family and font-size.
It is usually found in body
style. If you set style of body
as:
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 16px;
}
Summernote will show Helvetica Neue
and 16px
as default font-style and default font-size respectively.