source/fonts.js
// Event-handler for the font family list

Event-handler for the font family list
Event - handler for the font family list
function onFamilyListClick(e) {
    if (e.target && e.target.nodeName === 'LI') {
      const li = e.target
      const value = li.textContent
      if (value) {
        config.fontFamily = value
        sendFontFamilyChange()
        selectElement(li)
        setPreviewFontFamily()
      }
    }
  }
function onFamilyListClick ( e ) { if ( e . target && e . target . nodeName === 'LI' ) { const li = e . target const value = li . textContent if ( value ) { config . fontFamily = value sendFontFamilyChange ( ) selectElement ( li ) setPreviewFontFamily ( ) } } }
Event-handler for the font family list
Event - handler for the font family list
// The target element should be an <li> element
 // The <li> element's textContent is the font family, e.g. "Courier New"
 // Update font family value, send to Main Process, mark as selected
