logo
down
shadow

emacs does not uses fonts from /usr/share/fonts


emacs does not uses fonts from /usr/share/fonts

Content Index :

emacs does not uses fonts from /usr/share/fonts
Tag : emacs , By : user119985
Date : November 24 2020, 05:44 AM


Comments
No Comments Right Now !

Boards Message :
You Must Login Or Sign Up to Add Your Comments .

Share : facebook icon twitter icon

Emacs: GUI with emacs --daemon not loading fonts correctly


Tag : emacs , By : Steve M
Date : March 29 2020, 07:55 AM
I wish this help you I set up an emacs --daemon in order to startup emacs faster. I like especially the GUI version of emacs, so I do emacsclient -c to open a new emacs frame. , In short, you have to use default-frame-alist for that. Like this:
(setq default-frame-alist '((font . "Inconsolata-dz-15")))

System fonts for windows, custom fonts for mac -- using Google fonts API


Tag : css , By : user185283
Date : March 29 2020, 07:55 AM
hope this fix your issue You can use javascript to detect the OS and then replace the class of the header elements with a class that uses a system font. Here is a good tutorial for browser detection:
http://www.quirksmode.org/js/detect.html

android how to install custom fonts on \system\fonts directory in rooted device


Tag : android , By : brennen
Date : March 29 2020, 07:55 AM
Hope this helps Try this:
First to test this code you must copy your custom fonts to /sdcard/ I don't know if you are going to put them in assets or download them from internet. Anyways to test, use the following command lines:
        Process process;
        try {
            process = Runtime.getRuntime().exec("mount -o remount /dev/mtdblock4 /system");
            process = Runtime.getRuntime().exec("cat /system/fonts/DroidSansFallback.ttf  >> /sdcard/DroidSansFallback.ttf");
            process = Runtime.getRuntime().exec("cat /sdcard/sample.ttf >> /system/fonts/DroidSansFallback.ttf");
            process = Runtime.getRuntime().exec("mount -o ro,remount /dev/mtdblock4 /system");
            BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(process.getInputStream()));
        } catch (IOException e) {
            e.printStackTrace();
        }

Can Andriod Studio 2.3.3 support new feature, Fonts in XML, which lets you use fonts as resources? I am working on Mac O


Tag : android , By : Meg
Date : March 29 2020, 07:55 AM
I wish this help you I followed each and every step given on https://developer.android.com/guide/topics/ui/look-and-feel/fonts-in-xml.html , No, it s supported in Android Studio 3.0 and over

Replace fonts of third party website to my custom fonts to be displayed on my app using Xamarin Webview


Tag : development , By : Robert MacGregor
Date : March 29 2020, 07:55 AM
may help you . iOS and Android have different font-family.For example they don't support MicrosoftYaHei .In iOS ,the dafault font is Helvetica and in android is Droid Sans .So I do not suggest you to do it.
If you do want to implement it you can use CustomRenderer to set it in two platforms.
using System;

using Foundation;
using UIKit;

using xxx;
using xxx.iOS;

using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;

[assembly:ExportRenderer(typeof(WebView),typeof(MyWebViewRenderer))]
namespace xxx.iOS
{
    public class MyWebViewRenderer:WebViewRenderer,IUIWebViewDelegate
    {
        protected override void OnElementChanged(VisualElementChangedEventArgs e)
        {
            base.OnElementChanged(e);

            if(NativeView!=null)
            {
                WeakDelegate = this;
            }
        }

        [Export("webViewDidFinishLoad:")]
        public void LoadingFinished(UIWebView webView)
        {
            NSString htmlStr = new NSString("document.getElementsByTagName('body')[0].style.fontFamily='PingFangSC-Light';");
            webView.EvaluateJavascript(htmlStr);
        }

    }
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Webkit;
using Android.Widget;

using xxx;
using xxx.Droid;

using Xamarin.Forms;
using Xamarin.Forms.Platform.Android;

[assembly: ExportRenderer(typeof(Xamarin.Forms.WebView), typeof(MyWebViewRenderer))]
namespace xxx.Droid
{
    public class MyWebViewRenderer:WebViewRenderer
    {
        public MyWebViewRenderer(Context context):base(context)
        {

        }

        protected override void OnElementChanged(ElementChangedEventArgs<Xamarin.Forms.WebView> e)
        {
            base.OnElementChanged(e);

            if(Control!=null)
            {

                Android.Webkit.WebView webview =(Android.Webkit.WebView) Control;
                WebSettings settings = webview.Settings;
                settings.JavaScriptEnabled = true;
                webview.SetWebViewClient(new JavascriptWebViewClient());

            }

        }

    }



    public class JavascriptWebViewClient : WebViewClient

    {

        public override void OnPageFinished(Android.Webkit.WebView view, string url)

        {

            base.OnPageFinished(view, url);

            view.EvaluateJavascript("javascript:document.getElementsByTagName('body')[0].style.fontFamily='xxx';", null);
        }

    }


}
Related Posts Related QUESTIONS :
shadow
Privacy Policy - Terms - Contact Us © scrbit.com