From dc904e943ec27eb928ee25c4ab2343c596b846ba Mon Sep 17 00:00:00 2001 From: jamsonchan Date: Thu, 7 Sep 2023 12:06:22 +0800 Subject: [PATCH 1/2] Apply ZK85Icons to all themes. --- .../resources/web/zul/font/font-awesome.less | 3 ++- .../web/zul/less/font/_font-order.less | 14 +++++++++++ .../resources/web/zul/less/font/_shims.less | 11 ++++++++- zul/src/main/resources/web/zul/less/norm.less | 24 ------------------- 4 files changed, 26 insertions(+), 26 deletions(-) create mode 100644 zul/src/main/resources/web/zul/less/font/_font-order.less diff --git a/zul/src/main/resources/web/zul/font/font-awesome.less b/zul/src/main/resources/web/zul/font/font-awesome.less index 33d886fb271..1fb17ce7424 100644 --- a/zul/src/main/resources/web/zul/font/font-awesome.less +++ b/zul/src/main/resources/web/zul/font/font-awesome.less @@ -25,4 +25,5 @@ e('<%@ taglib uri="http://www.zkoss.org/dsp/web/theme" prefix="t" %>'); @import "~./zul/less/font/_shims.less"; @import "~./zul/less/font/brands.less"; @import "~./zul/less/font/regular.less"; -@import "~./zul/less/font/solid.less"; \ No newline at end of file +@import "~./zul/less/font/solid.less"; +@import "~./zul/less/font/_font-order.less"; \ No newline at end of file diff --git a/zul/src/main/resources/web/zul/less/font/_font-order.less b/zul/src/main/resources/web/zul/less/font/_font-order.less new file mode 100644 index 00000000000..362120049a9 --- /dev/null +++ b/zul/src/main/resources/web/zul/less/font/_font-order.less @@ -0,0 +1,14 @@ +// ZK85Icons & support FontAwesome 4 syntax +[class*="@{fa-css-prefix}-"] { + font-family: ZK85Icons, "Font Awesome 6 Free", "Font Awesome 6 Brands"; +} +// FontAwesome 6 solid & regular syntax +[class*="@{fa-css-prefix}-classic"], +[class*="@{fa-css-prefix}-solid"], +[class*="@{fa-css-prefix}-regular"] { + font-family: "Font Awesome 6 Free"; +} +// FontAwesome 6 brands syntax +[class*="@{fa-css-prefix}-brands"] { + font-family: "Font Awesome 6 Brands"; +} \ No newline at end of file diff --git a/zul/src/main/resources/web/zul/less/font/_shims.less b/zul/src/main/resources/web/zul/less/font/_shims.less index 372bbb07510..6dbc889335c 100644 --- a/zul/src/main/resources/web/zul/less/font/_shims.less +++ b/zul/src/main/resources/web/zul/less/font/_shims.less @@ -326,4 +326,13 @@ .gen_fa6_style(length(@solid_icons), @solid_icons, 'Font Awesome 6 Free', 900); .gen_fa6_style(length(@regular_icons), @regular_icons, 'Font Awesome 6 Free', 400); -.gen_fa6_style(length(@brands_icons), @brands_icons, 'Font Awesome 6 Brands', 400);; \ No newline at end of file +.gen_fa6_style(length(@brands_icons), @brands_icons, 'Font Awesome 6 Brands', 400); + +// To support specific ZK85Icons's icons, these unicodes are abandoned in fa6 + +.@{fa-css-prefix}-circle-o:before { content: "\f10c"; } +.@{fa-css-prefix}-envelope-o:before { content: "\f003"; } +.@{fa-css-prefix}-flag-o:before { content: "\f11d"; } +.@{fa-css-prefix}-question-circle-o:before { content: "\f29c"; } +.@{fa-css-prefix}-times-circle-o:before { content: "\f05c"; } +.@{fa-css-prefix}-user-o:before { content: "\f2c0"; } \ No newline at end of file diff --git a/zul/src/main/resources/web/zul/less/norm.less b/zul/src/main/resources/web/zul/less/norm.less index 6a066a8bfa4..d95f6965ae9 100644 --- a/zul/src/main/resources/web/zul/less/norm.less +++ b/zul/src/main/resources/web/zul/less/norm.less @@ -19,30 +19,6 @@ e(''); .applyCSS3('box-sizing', 'border-box'); } -// Set icons class -// ZK85Icons & support FontAwesome 4 syntax -[class*="@{fa-css-prefix}-"] { - font-family: ZK85Icons, "Font Awesome 6 Free", "Font Awesome 6 Brands"; // Default theme uses some override font -} -// FontAwesome 6 solid & regular syntax -[class*="@{fa-css-prefix}-classic"], -[class*="@{fa-css-prefix}-solid"], -[class*="@{fa-css-prefix}-regular"] { - font-family: "Font Awesome 6 Free"; -} -// FontAwesome 6 brands syntax -[class*="@{fa-css-prefix}-brands"] { - font-family: "Font Awesome 6 Brands"; -} - -// To support specific ZK85Icons's icons, these unicodes are abandoned in fa6 -.@{fa-css-prefix}-circle-o:before { content: "\f10c"; } -.@{fa-css-prefix}-envelope-o:before { content: "\f003"; } -.@{fa-css-prefix}-flag-o:before { content: "\f11d"; } -.@{fa-css-prefix}-question-circle-o:before { content: "\f29c"; } -.@{fa-css-prefix}-times-circle-o:before { content: "\f05c"; } -.@{fa-css-prefix}-user-o:before { content: "\f2c0"; } - // Reset @{browserDefaultPrefix}input[type=number]::-webkit-inner-spin-button, @{browserDefaultPrefix}input[type=number]::-webkit-outer-spin-button { From 67827761b2509e48ebb376c236f9ddc1759148ef Mon Sep 17 00:00:00 2001 From: jamsonchan Date: Mon, 11 Sep 2023 13:22:30 +0800 Subject: [PATCH 2/2] Integrate all fa6's font-family into one: 'FontAwesome' --- .../resources/web/zul/font/font-awesome.less | 3 -- .../resources/web/zul/less/_zkmixins.less | 2 +- .../resources/web/zul/less/font/_core.less | 8 +--- .../web/zul/less/font/_font-order.less | 31 ++++++++------ .../resources/web/zul/less/font/_icons.less | 4 ++ .../resources/web/zul/less/font/_mixins.less | 2 +- .../resources/web/zul/less/font/_path.less | 41 ++++++++++++++++++- .../resources/web/zul/less/font/_shims.less | 10 ++--- .../web/zul/less/font/_variables.less | 3 +- .../resources/web/zul/less/font/brands.less | 30 -------------- .../resources/web/zul/less/font/regular.less | 26 ------------ .../resources/web/zul/less/font/solid.less | 27 ------------ 12 files changed, 73 insertions(+), 114 deletions(-) delete mode 100644 zul/src/main/resources/web/zul/less/font/brands.less delete mode 100644 zul/src/main/resources/web/zul/less/font/regular.less delete mode 100644 zul/src/main/resources/web/zul/less/font/solid.less diff --git a/zul/src/main/resources/web/zul/font/font-awesome.less b/zul/src/main/resources/web/zul/font/font-awesome.less index 1fb17ce7424..6b4bd089dc0 100644 --- a/zul/src/main/resources/web/zul/font/font-awesome.less +++ b/zul/src/main/resources/web/zul/font/font-awesome.less @@ -23,7 +23,4 @@ e('<%@ taglib uri="http://www.zkoss.org/dsp/web/theme" prefix="t" %>'); @import "~./zul/less/font/_icons.less"; @import "~./zul/less/font/_screen-reader.less"; @import "~./zul/less/font/_shims.less"; -@import "~./zul/less/font/brands.less"; -@import "~./zul/less/font/regular.less"; -@import "~./zul/less/font/solid.less"; @import "~./zul/less/font/_font-order.less"; \ No newline at end of file diff --git a/zul/src/main/resources/web/zul/less/_zkmixins.less b/zul/src/main/resources/web/zul/less/_zkmixins.less index af3a3990692..d1281d90c22 100644 --- a/zul/src/main/resources/web/zul/less/_zkmixins.less +++ b/zul/src/main/resources/web/zul/less/_zkmixins.less @@ -280,7 +280,7 @@ // icon font utility .baseIconFont() { display: inline-block; - font-family: ZK85Icons, "Font Awesome 6 Free", "Font Awesome 6 Brands"; + font-family: ZK85Icons, FontAwesome; font-style: normal; font-weight: normal; font-size: inherit; diff --git a/zul/src/main/resources/web/zul/less/font/_core.less b/zul/src/main/resources/web/zul/less/font/_core.less index e5566f50002..550f83075c0 100644 --- a/zul/src/main/resources/web/zul/less/font/_core.less +++ b/zul/src/main/resources/web/zul/less/font/_core.less @@ -27,12 +27,8 @@ .@{fa-css-prefix}-classic, .@{fa-css-prefix}-solid, .far, -.@{fa-css-prefix}-regular { - font-family: 'Font Awesome 6 Free'; -} - +.@{fa-css-prefix}-regular, .fab, .@{fa-css-prefix}-brands { - font-family: 'Font Awesome 6 Brands'; + font-family: FontAwesome; } - diff --git a/zul/src/main/resources/web/zul/less/font/_font-order.less b/zul/src/main/resources/web/zul/less/font/_font-order.less index 362120049a9..459d32ad6de 100644 --- a/zul/src/main/resources/web/zul/less/font/_font-order.less +++ b/zul/src/main/resources/web/zul/less/font/_font-order.less @@ -1,14 +1,21 @@ // ZK85Icons & support FontAwesome 4 syntax [class*="@{fa-css-prefix}-"] { - font-family: ZK85Icons, "Font Awesome 6 Free", "Font Awesome 6 Brands"; -} -// FontAwesome 6 solid & regular syntax -[class*="@{fa-css-prefix}-classic"], -[class*="@{fa-css-prefix}-solid"], -[class*="@{fa-css-prefix}-regular"] { - font-family: "Font Awesome 6 Free"; -} -// FontAwesome 6 brands syntax -[class*="@{fa-css-prefix}-brands"] { - font-family: "Font Awesome 6 Brands"; -} \ No newline at end of file + font-family: ZK85Icons, FontAwesome; +} + +// Font Awesome 6 syntax +.fas, +.@{fa-css-prefix}-solid { + font-family: FontAwesome; + font-weight: 900; +} +.far, +.@{fa-css-prefix}-regular { + font-family: FontAwesome; + font-weight: 400; +} +.fab, +.@{fa-css-prefix}-brands { + font-family: FontAwesome; + font-weight: 400; +} diff --git a/zul/src/main/resources/web/zul/less/font/_icons.less b/zul/src/main/resources/web/zul/less/font/_icons.less index b715b40de9f..d3cdcbc08d9 100644 --- a/zul/src/main/resources/web/zul/less/font/_icons.less +++ b/zul/src/main/resources/web/zul/less/font/_icons.less @@ -7,3 +7,7 @@ each(.fa-icons(), { .@{fa-css-prefix}-@{key}::before { content: @value; } }); + +each(.fa-brand-icons(), { + .@{fa-css-prefix}-@{key}:before { content: @value; } +}); diff --git a/zul/src/main/resources/web/zul/less/font/_mixins.less b/zul/src/main/resources/web/zul/less/font/_mixins.less index 6ed7151ff5a..ebca97e99c1 100644 --- a/zul/src/main/resources/web/zul/less/font/_mixins.less +++ b/zul/src/main/resources/web/zul/less/font/_mixins.less @@ -43,7 +43,7 @@ // sets a specific icon family to use alongside style + icon mixins .fa-family-classic() { - font-family: 'Font Awesome 6 Free'; + font-family: FontAwesome; } // convenience mixins for declaring pseudo-elements by CSS variable, diff --git a/zul/src/main/resources/web/zul/less/font/_path.less b/zul/src/main/resources/web/zul/less/font/_path.less index 0e9171cb116..2f074d43b6a 100644 --- a/zul/src/main/resources/web/zul/less/font/_path.less +++ b/zul/src/main/resources/web/zul/less/font/_path.less @@ -10,4 +10,43 @@ url(${c:encodeURL("~./zul/less/font/ZK85Icons.svg?v=4.7.0#ZK85Icons")}) format("svg");'); font-weight: normal; font-style: normal; -} \ No newline at end of file +} + +/*! + * Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com + * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) + * Copyright 2023 Fonticons, Inc. + */ + +// solid.less +@font-face { + font-family: 'FontAwesome'; + font-style: normal; + font-weight: 900; + font-display: @fa-font-display; + e('src: url(${c:encodeURL("@{fa-font-path}/fa-solid-900.woff2")}) format("woff2"), + url(${c:encodeURL("@{fa-font-path}/fa-solid-900.ttf")}) format("truetype"), + url(${c:encodeURL("@{fa-font-path}/solid.svg")}) format("svg");'); +} + +// regular.less +@font-face { + font-family: 'FontAwesome'; + font-style: normal; + font-weight: 400; + font-display: @fa-font-display; + e('src: url(${c:encodeURL("@{fa-font-path}/fa-regular-400.woff2")}) format("woff2"), + url(${c:encodeURL("@{fa-font-path}/fa-regular-400.ttf")}) format("truetype"), + url(${c:encodeURL("@{fa-font-path}/regular.svg")}) format("svg");'); +} + +// brands.less +@font-face { + font-family: 'FontAwesome'; + font-style: normal; + font-weight: 400; + font-display: @fa-font-display; + e('src: url(${c:encodeURL("@{fa-font-path}/fa-brands-400.woff2")}) format("woff2"), + url(${c:encodeURL("@{fa-font-path}/fa-brands-400.ttf")}) format("truetype"), + url(${c:encodeURL("@{fa-font-path}/brands.svg")}) format("svg");'); +} diff --git a/zul/src/main/resources/web/zul/less/font/_shims.less b/zul/src/main/resources/web/zul/less/font/_shims.less index 6dbc889335c..91beff3fca9 100644 --- a/zul/src/main/resources/web/zul/less/font/_shims.less +++ b/zul/src/main/resources/web/zul/less/font/_shims.less @@ -320,13 +320,13 @@ .gen_fa6_style(@i - 1, @icons, @font-family, @font-weight); } -@solid_icons: address-book, address-card, adjust, align-center, align-justify, align-left, align-right, ambulance, american-sign-language-interpreting, anchor, angle-double-down, angle-double-left, angle-double-right, angle-double-up, angle-down, angle-left, angle-right, angle-up, archive, area-chart, arrow-circle-down, arrow-circle-left, arrow-circle-right, arrow-circle-up, arrow-down, arrow-left, arrow-right, arrow-up, arrows, arrows-alt, arrows-h, arrows-v, asl-interpreting, assistive-listening-systems, asterisk, at, audio-description, automobile, backward, balance-scale, ban, bank, bar-chart, bar-chart-o, barcode, bars, bath, bathtub, battery, battery-0, battery-1, battery-2, battery-3, battery-4, battery-empty, battery-full, battery-half, battery-quarter, battery-three-quarters, bed, beer, bell, bell-slash, bicycle, binoculars, birthday-cake, blind, bold, bolt, bomb, book, bookmark, braille, briefcase, bug, building, bullhorn, bullseye, bus, cab, calculator, calendar, camera, camera-retro, car, caret-down, caret-left, caret-right, caret-up, cart-arrow-down, cart-plus, certificate, chain, chain-broken, check, check-circle, check-square, chevron-circle-down, chevron-circle-left, chevron-circle-right, chevron-circle-up, chevron-down, chevron-left, chevron-right, chevron-up, child, circle, circle-o-notch, clipboard, close, cloud, cloud-download, cloud-upload, cny, code, code-fork, coffee, cog, cogs, columns, comment, commenting, comments, compress, copy, credit-card-alt, crop, crosshairs, cube, cubes, cut, cutlery, dashboard, database, deaf, deafness, dedent, desktop, dollar, download, drivers-license, eject, ellipsis-h, ellipsis-v, envelope, envelope-open, envelope-square, eraser, eur, euro, exchange, exclamation, exclamation-circle, exclamation-triangle, expand, external-link, external-link-square, eyedropper, fast-backward, fast-forward, fax, feed, female, fighter-jet, file, file-text, film, filter, fire, fire-extinguisher, flag, flag-checkered, flash, flask, folder, folder-open, font, forward, gamepad, gavel, gbp, gear, gears, genderless, gift, glass, globe, graduation-cap, group, h-square, hard-of-hearing, hashtag, header, headphones, heart, heartbeat, history, home, hotel, hourglass, hourglass-1, hourglass-2, hourglass-3, hourglass-end, hourglass-half, hourglass-o, hourglass-start, i-cursor, id-card, ils, inbox, indent, industry, info, info-circle, inr, institution, intersex, italic, jpy, key, krw, language, laptop, leaf, legal, level-down, level-up, life-bouy, life-buoy, life-ring, life-saver, line-chart, link, list, list-ol, list-ul, location-arrow, lock, long-arrow-down, long-arrow-left, long-arrow-right, long-arrow-up, low-vision, magic, magnet, mail-forward, mail-reply, mail-reply-all, male, map, map-marker, map-pin, map-signs, mars, mars-double, mars-stroke, mars-stroke-h, mars-stroke-v, meanpath, medkit, mercury, microchip, microphone, microphone-slash, minus, minus-circle, minus-square, mobile, mobile-phone, money, mortar-board, motorcycle, mouse-pointer, music, navicon, neuter, outdent, paint-brush, paper-plane, paperclip, paragraph, paste, pause, pause-circle, paw, pencil, pencil-square, percent, phone, phone-square, pie-chart, plane, play, play-circle, plug, plus, plus-circle, plus-square, podcast, power-off, print, puzzle-piece, qrcode, question, question-circle, quote-left, quote-right, random, recycle, refresh, remove, reorder, repeat, reply, reply-all, retweet, rmb, road, rocket, rotate-left, rotate-right, rouble, rss, rss-square, rub, ruble, rupee, s15, scissors, search, search-minus, search-plus, send, server, share, share-alt, share-alt-square, share-square, share-square-o, shekel, sheqel, shield, ship, shopping-bag, shopping-basket, shopping-cart, shower, sign-in, sign-language, sign-out, signal, signing, sitemap, sliders, sort, sort-alpha-asc, sort-alpha-desc, sort-amount-asc, sort-amount-desc, sort-asc, sort-desc, sort-down, sort-numeric-asc, sort-numeric-desc, sort-up, space-shuttle, spinner, spoon, square, star, star-half, step-backward, step-forward, stethoscope, sticky-note, stop, stop-circle, street-view, strikethrough, subscript, subway, suitcase, superscript, support, table, tablet, tachometer, tag, tags, tasks, taxi, television, terminal, text-height, text-width, th, th-large, th-list, thermometer, thermometer-0, thermometer-1, thermometer-2, thermometer-3, thermometer-4, thermometer-empty, thermometer-full, thermometer-half, thermometer-quarter, thermometer-three-quarters, thumb-tack, thumbs-down, thumbs-up, ticket, times, times-circle, times-rectangle, tint, toggle-off, toggle-on, trademark, train, transgender, transgender-alt, trash, tree, tripadvisor, trophy, truck, try, tty, turkish-lira, tv, umbrella, underline, undo, universal-access, university, unlink, unlock, unlock-alt, unsorted, upload, usd, user, user-circle, user-md, user-plus, user-secret, user-times, users, vcard, venus, venus-double, venus-mars, video-camera, volume-control-phone, volume-down, volume-off, volume-up, warning, wheelchair, wifi, window-close, window-minimize, won, wrench, yen; -@regular_icons: address-book-o, address-card-o, arrow-circle-o-down, arrow-circle-o-left, arrow-circle-o-right, arrow-circle-o-up, bell-o, bell-slash-o, bookmark-o, building-o, calendar-check-o, calendar-minus-o, calendar-o, calendar-plus-o, calendar-times-o, caret-square-o-down, caret-square-o-left, caret-square-o-right, caret-square-o-up, cc, check-circle-o, check-square-o, circle-o, circle-thin, clock-o, clone, comment-o, commenting-o, comments-o, compass, copyright, credit-card, diamond, dot-circle-o, drivers-license-o, edit, envelope-o, envelope-open-o, eye, eye-slash, file-archive-o, file-audio-o, file-code-o, file-excel-o, file-image-o, file-movie-o, file-o, file-pdf-o, file-photo-o, file-picture-o, file-powerpoint-o, file-sound-o, file-text-o, file-video-o, file-word-o, file-zip-o, files-o, flag-o, floppy-o, folder-o, folder-open-o, frown-o, futbol-o, hand-grab-o, hand-lizard-o, hand-o-down, hand-o-left, hand-o-right, hand-o-up, hand-paper-o, hand-peace-o, hand-pointer-o, hand-rock-o, hand-scissors-o, hand-spock-o, hand-stop-o, handshake-o, hdd-o, heart-o, hospital-o, id-badge, id-card-o, image, keyboard-o, lemon-o, lightbulb-o, list-alt, map-o, meh-o, minus-square-o, moon-o, newspaper-o, object-group, object-ungroup, paper-plane-o, pause-circle-o, pencil-square-o, photo, picture-o, play-circle-o, plus-square-o, question-circle-o, registered, save, send-o, smile-o, snowflake-o, soccer-ball-o, square-o, star-half-empty, star-half-full, star-half-o, star-o, sticky-note-o, stop-circle-o, sun-o, thumbs-o-down, thumbs-o-up, times-circle-o, times-rectangle-o, toggle-down, toggle-left, toggle-right, toggle-up, trash-o, user-circle-o, user-o, vcard-o, window-close-o, window-maximize, window-restore; +@solid_icons: address-book, address-card, adjust, align-center, align-justify, align-left, align-right, ambulance, american-sign-language-interpreting, anchor, angle-double-down, angle-double-left, angle-double-right, angle-double-up, angle-down, angle-left, angle-right, angle-up, archive, area-chart, arrow-circle-down, arrow-circle-left, arrow-circle-right, arrow-circle-up, arrow-down, arrow-left, arrow-right, arrow-up, arrows, arrows-alt, arrows-h, arrows-v, asl-interpreting, assistive-listening-systems, asterisk, at, audio-description, automobile, backward, balance-scale, ban, bank, bar-chart, bar-chart-o, barcode, bars, bath, bathtub, battery, battery-0, battery-1, battery-2, battery-3, battery-4, battery-empty, battery-full, battery-half, battery-quarter, battery-three-quarters, bed, beer, bell, bell-slash, bicycle, binoculars, birthday-cake, blind, bold, bolt, bomb, book, bookmark, braille, briefcase, bug, building, bullhorn, bullseye, bus, cab, calculator, calendar, camera, camera-retro, car, caret-down, caret-left, caret-right, caret-up, cart-arrow-down, cart-plus, certificate, chain, chain-broken, check, check-circle, check-square, chevron-circle-down, chevron-circle-left, chevron-circle-right, chevron-circle-up, chevron-down, chevron-left, chevron-right, chevron-up, child, circle, circle-o-notch, clipboard, close, cloud, cloud-download, cloud-upload, cny, code, code-fork, coffee, cog, cogs, columns, comment, commenting, comments, compress, copy, credit-card-alt, crop, crosshairs, cube, cubes, cut, cutlery, dashboard, database, deaf, deafness, dedent, desktop, dollar, download, drivers-license, eject, ellipsis-h, ellipsis-v, envelope, envelope-open, envelope-square, eraser, eur, euro, exchange, exclamation, exclamation-circle, exclamation-triangle, expand, external-link, external-link-square, eyedropper, fast-backward, fast-forward, fax, feed, female, fighter-jet, file, file-text, film, filter, fire, fire-extinguisher, flag, flag-checkered, flash, flask, folder, folder-open, font, forward, gamepad, gavel, gbp, gear, gears, genderless, gift, glass, globe, graduation-cap, group, h-square, hard-of-hearing, hashtag, header, headphones, heart, heartbeat, history, home, hotel, hourglass, hourglass-1, hourglass-2, hourglass-3, hourglass-end, hourglass-half, hourglass-o, hourglass-start, i-cursor, id-card, ils, inbox, indent, industry, info, info-circle, inr, institution, intersex, italic, jpy, key, krw, language, laptop, leaf, legal, level-down, level-up, life-bouy, life-buoy, life-ring, life-saver, line-chart, link, list, list-ol, list-ul, location-arrow, lock, long-arrow-down, long-arrow-left, long-arrow-right, long-arrow-up, low-vision, magic, magnet, mail-forward, mail-reply, mail-reply-all, male, map, map-marker, map-pin, map-signs, mars, mars-double, mars-stroke, mars-stroke-h, mars-stroke-v, meanpath, medkit, mercury, microchip, microphone, microphone-slash, minus, minus-circle, minus-square, mobile, mobile-phone, money, mortar-board, motorcycle, mouse-pointer, music, navicon, neuter, outdent, paint-brush, paper-plane, paperclip, paragraph, paste, pause, pause-circle, paw, pencil, pencil-square, percent, phone, phone-square, pie-chart, plane, play, play-circle, plug, plus, plus-circle, plus-square, podcast, power-off, print, puzzle-piece, qrcode, question, question-circle, quote-left, quote-right, random, recycle, refresh, remove, reorder, repeat, reply, reply-all, retweet, rmb, road, rocket, rotate-left, rotate-right, rouble, rss, rss-square, rub, ruble, rupee, s15, scissors, search, search-minus, search-plus, send, server, share, share-alt, share-alt-square, share-square, shekel, sheqel, shield, ship, shopping-bag, shopping-basket, shopping-cart, shower, sign-in, sign-language, sign-out, signal, signing, sitemap, sliders, sort, sort-alpha-asc, sort-alpha-desc, sort-amount-asc, sort-amount-desc, sort-asc, sort-desc, sort-down, sort-numeric-asc, sort-numeric-desc, sort-up, space-shuttle, spinner, spoon, square, star, star-half, step-backward, step-forward, stethoscope, sticky-note, stop, stop-circle, street-view, strikethrough, subscript, subway, suitcase, superscript, support, table, tablet, tachometer, tag, tags, tasks, taxi, television, terminal, text-height, text-width, th, th-large, th-list, thermometer, thermometer-0, thermometer-1, thermometer-2, thermometer-3, thermometer-4, thermometer-empty, thermometer-full, thermometer-half, thermometer-quarter, thermometer-three-quarters, thumb-tack, thumbs-down, thumbs-up, ticket, times, times-circle, times-rectangle, tint, toggle-off, toggle-on, trademark, train, transgender, transgender-alt, trash, tree, tripadvisor, trophy, truck, try, tty, turkish-lira, tv, umbrella, underline, undo, universal-access, university, unlink, unlock, unlock-alt, unsorted, upload, usd, user, user-circle, user-md, user-plus, user-secret, user-times, users, vcard, venus, venus-double, venus-mars, video-camera, volume-control-phone, volume-down, volume-off, volume-up, warning, wheelchair, wifi, window-close, window-minimize, won, wrench, yen; +@regular_icons: address-book-o, address-card-o, arrow-circle-o-down, arrow-circle-o-left, arrow-circle-o-right, arrow-circle-o-up, bell-o, bell-slash-o, bookmark-o, building-o, calendar-check-o, calendar-minus-o, calendar-o, calendar-plus-o, calendar-times-o, caret-square-o-down, caret-square-o-left, caret-square-o-right, caret-square-o-up, cc, check-circle-o, check-square-o, circle-o, circle-thin, clock-o, clone, comment-o, commenting-o, comments-o, compass, copyright, credit-card, diamond, dot-circle-o, drivers-license-o, edit, envelope-o, envelope-open-o, eye, eye-slash, file-archive-o, file-audio-o, file-code-o, file-excel-o, file-image-o, file-movie-o, file-o, file-pdf-o, file-photo-o, file-picture-o, file-powerpoint-o, file-sound-o, file-text-o, file-video-o, file-word-o, file-zip-o, files-o, flag-o, floppy-o, folder-o, folder-open-o, frown-o, futbol-o, hand-grab-o, hand-lizard-o, hand-o-down, hand-o-left, hand-o-right, hand-o-up, hand-paper-o, hand-peace-o, hand-pointer-o, hand-rock-o, hand-scissors-o, hand-spock-o, hand-stop-o, handshake-o, hdd-o, heart-o, hospital-o, id-badge, id-card-o, image, keyboard-o, lemon-o, lightbulb-o, list-alt, map-o, meh-o, minus-square-o, moon-o, newspaper-o, object-group, object-ungroup, paper-plane-o, pause-circle-o, pencil-square-o, photo, picture-o, play-circle-o, plus-square-o, question-circle-o, registered, save, send-o, share-square-o, smile-o, snowflake-o, soccer-ball-o, square-o, star-half-empty, star-half-full, star-half-o, star-o, sticky-note-o, stop-circle-o, sun-o, thumbs-o-down, thumbs-o-up, times-circle-o, times-rectangle-o, toggle-down, toggle-left, toggle-right, toggle-up, trash-o, user-circle-o, user-o, vcard-o, window-close-o, window-maximize, window-restore; @brands_icons: 500px, adn, amazon, android, angellist, apple, bandcamp, behance, behance-square, bitbucket, bitbucket-square, bitcoin, black-tie, bluetooth, bluetooth-b, btc, buysellads, cc-amex, cc-diners-club, cc-discover, cc-jcb, cc-mastercard, cc-paypal, cc-stripe, cc-visa, chrome, codepen, codiepie, connectdevelop, contao, creative-commons, css3, dashcube, delicious, deviantart, digg, dribbble, dropbox, drupal, edge, eercast, empire, envira, etsy, expeditedssl, fa, facebook, facebook-f, facebook-official, facebook-square, firefox, first-order, flickr, font-awesome, fonticons, fort-awesome, forumbee, foursquare, free-code-camp, ge, get-pocket, gg, gg-circle, git, git-square, github, github-alt, github-square, gitlab, gittip, glide, glide-g, google, google-plus, google-plus-circle, google-plus-official, google-plus-square, google-wallet, gratipay, grav, hacker-news, houzz, html5, imdb, instagram, internet-explorer, ioxhost, joomla, jsfiddle, lastfm, lastfm-square, leanpub, linkedin, linkedin-square, linode, linux, maxcdn, medium, meetup, mixcloud, modx, odnoklassniki, odnoklassniki-square, opencart, openid, opera, optin-monster, pagelines, paypal, pied-piper, pied-piper-alt, pied-piper-pp, pinterest, pinterest-p, pinterest-square, product-hunt, qq, quora, ra, ravelry, rebel, reddit, reddit-alien, reddit-square, renren, resistance, safari, scribd, sellsy, shirtsinbulk, simplybuilt, skyatlas, skype, slack, slideshare, snapchat, snapchat-ghost, snapchat-square, soundcloud, spotify, stack-exchange, stack-overflow, steam, steam-square, stumbleupon, stumbleupon-circle, superpowers, telegram, tencent-weibo, themeisle, trello, tumblr, tumblr-square, twitch, twitter, twitter-square, usb, viacoin, viadeo, viadeo-square, vimeo, vimeo-square, vine, vk, wechat, weibo, weixin, whatsapp, wheelchair-alt, wikipedia-w, windows, wordpress, wpbeginner, wpexplorer, wpforms, xing, xing-square, y-combinator, y-combinator-square, yahoo, yc, yc-square, yelp, yoast, youtube, youtube-play, youtube-square; -.gen_fa6_style(length(@solid_icons), @solid_icons, 'Font Awesome 6 Free', 900); -.gen_fa6_style(length(@regular_icons), @regular_icons, 'Font Awesome 6 Free', 400); -.gen_fa6_style(length(@brands_icons), @brands_icons, 'Font Awesome 6 Brands', 400); +.gen_fa6_style(length(@solid_icons), @solid_icons, FontAwesome, 900); +.gen_fa6_style(length(@regular_icons), @regular_icons, FontAwesome, 400); +.gen_fa6_style(length(@brands_icons), @brands_icons, FontAwesome, 400); // To support specific ZK85Icons's icons, these unicodes are abandoned in fa6 diff --git a/zul/src/main/resources/web/zul/less/font/_variables.less b/zul/src/main/resources/web/zul/less/font/_variables.less index 770274a5cd1..6cba8c8d9e5 100644 --- a/zul/src/main/resources/web/zul/less/font/_variables.less +++ b/zul/src/main/resources/web/zul/less/font/_variables.less @@ -3,8 +3,7 @@ @fa-css-prefix : z-icon; @fa-style : 900; -@fa-style-family : "Font Awesome 6 Free"; -@fa-style-family-sharp : "Font Awesome 6 Sharp"; +@fa-style-family : 'FontAwesome'; @fa-display : inline-block; diff --git a/zul/src/main/resources/web/zul/less/font/brands.less b/zul/src/main/resources/web/zul/less/font/brands.less deleted file mode 100644 index 6c8087c5700..00000000000 --- a/zul/src/main/resources/web/zul/less/font/brands.less +++ /dev/null @@ -1,30 +0,0 @@ -/*! - * Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com - * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) - * Copyright 2023 Fonticons, Inc. - */ -@import "_variables.less"; - -:root, :host { - --@{fa-css-prefix}-style-family-brands: 'Font Awesome 6 Brands'; - --@{fa-css-prefix}-font-brands: normal 400 1em/1 'Font Awesome 6 Brands'; -} - -@font-face { - font-family: 'Font Awesome 6 Brands'; - font-style: normal; - font-weight: 400; - font-display: @fa-font-display; - e('src: url(${c:encodeURL("@{fa-font-path}/fa-brands-400.woff2")}) format("woff2"), - url(${c:encodeURL("@{fa-font-path}/fa-brands-400.ttf")}) format("truetype"), - url(${c:encodeURL("@{fa-font-path}/brands.svg")}) format("svg");'); -} - -.fab, -.@{fa-css-prefix}-brands { - font-weight: 400; -} - -each(.fa-brand-icons(), { - .@{fa-css-prefix}-@{key}:before { content: @value; } -}); diff --git a/zul/src/main/resources/web/zul/less/font/regular.less b/zul/src/main/resources/web/zul/less/font/regular.less deleted file mode 100644 index d673dd325a9..00000000000 --- a/zul/src/main/resources/web/zul/less/font/regular.less +++ /dev/null @@ -1,26 +0,0 @@ -/*! - * Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com - * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) - * Copyright 2023 Fonticons, Inc. - */ -@import "_variables.less"; - -:root, :host { - --@{fa-css-prefix}-style-family-classic: '@{fa-style-family}'; - --@{fa-css-prefix}-font-regular: normal 400 1em/1 '@{fa-style-family}'; -} - -@font-face { - font-family: 'Font Awesome 6 Free'; - font-style: normal; - font-weight: 400; - font-display: @fa-font-display; - e('src: url(${c:encodeURL("@{fa-font-path}/fa-regular-400.woff2")}) format("woff2"), - url(${c:encodeURL("@{fa-font-path}/fa-regular-400.ttf")}) format("truetype"), - url(${c:encodeURL("@{fa-font-path}/regular.svg")}) format("svg");'); -} - -.far, -.@{fa-css-prefix}-regular { - font-weight: 400; -} diff --git a/zul/src/main/resources/web/zul/less/font/solid.less b/zul/src/main/resources/web/zul/less/font/solid.less deleted file mode 100644 index 57503d9dea1..00000000000 --- a/zul/src/main/resources/web/zul/less/font/solid.less +++ /dev/null @@ -1,27 +0,0 @@ -/*! - * Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com - * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) - * Copyright 2023 Fonticons, Inc. - */ -@import "_variables.less"; - -:root, :host { - --@{fa-css-prefix}-style-family-classic: '@{fa-style-family}'; - --@{fa-css-prefix}-font-solid: normal 900 1em/1 '@{fa-style-family}'; -} - -@font-face { - font-family: 'Font Awesome 6 Free'; - font-style: normal; - font-weight: 900; - font-display: @fa-font-display; - e('src: url(${c:encodeURL("@{fa-font-path}/fa-solid-900.woff2")}) format("woff2"), - url(${c:encodeURL("@{fa-font-path}/fa-solid-900.ttf")}) format("truetype"), - url(${c:encodeURL("@{fa-font-path}/solid.svg")}) format("svg");'); -} - - -.fas, -.@{fa-css-prefix}-solid { - font-weight: 900; -}