font-awesome

How to show font awesome icon in symfony form select

℡╲_俬逩灬. 提交于 2019-12-06 05:12:16
问题 I Want to show all font awesome icon in select option with Symfony Form Builder. I add the select field with : $choices = $this->getFontAwesome(); $form->add( $key, ChoiceType::class, array('label' => 'Texte', 'choices' => $choices, 'attr' => array('class' => "fa" ) ) ); My Function getFontAwesome(); public function getFontAwesome(){ $webroot = $this->get('kernel')->getRootDir() . '/../web'; $pattern = '/\.(fa-(?:\w+(?:-)?)+):before\s+{\s*content:\s*"\\\\(.+)";\s+}/'; $subject = file_get

Font Awesome error: downloadable font: rejected by sanitizer

余生长醉 提交于 2019-12-06 04:50:01
downloadable font: rejected by sanitizer (font-family: "FontAwesome" style:normal weight:normal stretch:normal src index:1) source: http://192.168.1.254/theme/font-awesome/fonts/fontawesome-webfont.woff2?v=4.6.3 http://192.168.1.254/theme/font-awesome/css/font-awesome.min.css Line 4 I was keep getting above error. and i tried lots of stuff found on the internet. (hosting the fonts on own server) CORS issue MIME-type header config in web server Other combinations of HTTP headers and MIME-types everything that can resolve the issue but nothing solved it. Amit Shah Solution: Remove the "?v=4.6.3"

How to use Font Awesome with MPDF?

空扰寡人 提交于 2019-12-06 04:26:48
问题 I am using Zend Framework and creating PDF with mpdf. I am trying to use fontawesome for denoting some of the articles but the fonts of font awesome are not rendering properly below is the code . $stylesheet = file_get_contents("https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"); $stylesheet .= file_get_contents("https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css"); $this->mpdf->WriteHTML($stylesheet,1); $this->mpdf->WriteHTML($html,2); $this-

Can't load font-awesome with Webpack [duplicate]

核能气质少年 提交于 2019-12-06 03:33:06
问题 This question already has an answer here : How to configure webpack to load glyphicons/font-awesome icons in React (1 answer) Closed last year . Trying to load font-awesome with webpack gives me this error: ERROR in ./~/font-awesome/fonts/fontawesome-webfont.eot?v=4.6.3 Module parse failed: ...\node_modules\font-awesome\fonts\fontawesome-webfont.eot?v=4.6.3 Unexpected character '�' (1:0) You may need an appropriate loader to handle this file type. I'm trying to import font-awesome in a React

ng-cli 6 and font awesome icons not working

对着背影说爱祢 提交于 2019-12-06 02:47:46
问题 I am using font-awesome 4.70, angular 6.0.8, and cli 6.0.8(full versioning below) I am trying to replace our existing webpack process with the cli's "ng build". I have run into an issue with font awesome's icons not showing up. I have seen similar issues in the past with older versions but I havent found a solution yet. I have the fonts hooked up in my assets assets:[ "./node_modules/font-awesome/fonts", //other assets ] And I am including the css in the styles portion of my angula.json

jQuery Accordion change font awesome icon class on click

不打扰是莪最后的温柔 提交于 2019-12-05 22:56:41
I have a question about a simple jQuery accordion I found. I'd like to use Font Awesome icons to indicate the active/inactive state with plus and minus icons. In my JSFiddle you see the accordion titles with plus icons. When you click on a title the "fa-plus" class needs to change to "fa-minus". I already did some tests with add and removeClass, but I couldn't get it working. I'm really a jQuery/javascript noob! Hope you guys can help me out :-). jQuery('.accordion dt').click(function() { jQuery('.accordion dt').removeClass('active'); jQuery('.accordion_content').slideUp('normal'); if(jQuery

FontAwesome Icons in Angular 6?

谁说胖子不能爱 提交于 2019-12-05 22:44:06
问题 I'm trying to use icons from FontAwesome in an Angular project. I started with the "Getting Started" guide you can find here: FontAwesome Angular Getting Started Everything works fine, i can see the faCoffee icon wherever i put it in my templates. But if I try to change it to another icon (ex. the "check" icon), nothing is shown. I changed my icon declaration at component-level to make it look like this: import { faCheck } from '@fortawesome/free-solid-svg-icons'; Changed the html template to

Font Awesome 5 use social/brand icons in React

China☆狼群 提交于 2019-12-05 19:15:26
问题 The Font Awesome documentation shows only how to add regular/solid fonts to React. How about social icons? First I grabbed the packages: npm i --save @fortawesome/fontawesome-svg-core \ npm i --save @fortawesome/free-brands-svg-icons \ npm i --save @fortawesome/react-fontawesome Note: I replaced npm i --save @fortawesome/free-solid-svg-icons \ with npm i --save @fortawesome/free-brands-svg-icons \ Then in React: import { library } from '@fortawesome/fontawesome-svg-core' import {

encoding error displaying fontawesome with imagemagick

此生再无相见时 提交于 2019-12-05 18:43:43
i'm trying to use fontawesome with imagemagick to display it's character as png , here is my code: $size = '50'; $text = ''; $imgW = 200; $imgH = 200; $font = 'fontawesome-webfont.ttf'; $image = new Imagick(); $image->setResolution(144,144); $draw = new ImagickDraw(); $draw->setFont($font); $draw->setFontSize($size); //$draw->setTextEncoding('UTF-8'); //$draw->setStrokeAntialias(true); //$draw->setTextAntialias(true); $image->newImage($imgW, $imgH, new ImagickPixel('none')); $image->annotateImage($draw, 10, 45, 0, $text); $image->setImageFormat('png'); header('Content-type: image/png'); echo

Adding custom icon in font awesome

╄→гoц情女王★ 提交于 2019-12-05 17:27:31
I tried adding a custom icon by converting it into .svg format. I added the converted .svg icon by importing it into http://icomoon.io/app/ and downloaded as .png image. It was not the original image.It was a simple black box. Am i missing something here?? I am doing this now. Check out this tutorial! It uses a utility called Font Custom, which from the sounds of it you might not need, but maybe the tutorial will help you get back on track. Create your own Font Awesome Icons 来源: https://stackoverflow.com/questions/17588775/adding-custom-icon-in-font-awesome