<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Abdullah Nasir</title>
    <description>The latest articles on DEV Community by Abdullah Nasir (@abdullah_nasir).</description>
    <link>https://dev.to/abdullah_nasir</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3624522%2F54543bdb-5af2-4ce6-8abf-d68b2fd00abb.jpeg</url>
      <title>DEV Community: Abdullah Nasir</title>
      <link>https://dev.to/abdullah_nasir</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/abdullah_nasir"/>
    <language>en</language>
    <item>
      <title>How to add font family in Next.js | The Modern Way</title>
      <dc:creator>Abdullah Nasir</dc:creator>
      <pubDate>Sun, 18 Jan 2026 16:15:12 +0000</pubDate>
      <link>https://dev.to/abdullah_nasir/how-to-add-font-family-in-nextjs-the-modern-way-2l8h</link>
      <guid>https://dev.to/abdullah_nasir/how-to-add-font-family-in-nextjs-the-modern-way-2l8h</guid>
      <description>&lt;p&gt;For a long time, I struggled to find the "right" way to add custom fonts to a Next.js project. I searched through endless forums and saw different kinds of processes, like the old-fashioned way where you have to download the raw font files, manually move them into a public/fonts folder, and then write messy @font-face rules in your CSS. While that works, it's a headache. It bloats your project size, takes up extra space in your GitHub repo, and usually causes that annoying "flicker" (Layout Shift) where the text jumps around when the page loads.&lt;/p&gt;

&lt;p&gt;But there is more simple way from the help you can do the same process in short&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Initialize the Font&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Instead of downloading files, we import the font directly from next/font/google. Next.js will automatically download the font files at build time and host them locally for you. This means no extra space is taken up in your source cod.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Open your app/layout.tsx and set it up outside the component:&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { Poppins } from "next/font/google";

const poppins = Poppins({
  subsets: ["latin"],
  weight: ["400", "600", "700"], 
  variable: "--font-poppins", 
  display: "swap", 
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Inject the Font into your Layout&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now, you need to "inject" that variable into your HTML so the rest of your app (and Tailwind) can see it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    &amp;lt;html lang="en" className={`${poppins.variable}`}&amp;gt;
      &amp;lt;body className="antialiased"&amp;gt;
        {children}
      &amp;lt;/body&amp;gt;
    &amp;lt;/html&amp;gt;
  );
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3. Connect to Tailwind CSS&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Next.js provides the font data, but Tailwind needs a "name" to call it by. Open tailwind.config.ts and map a utility class to your new CSS variable.&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import type { Config } from "tailwindcss";

const config: Config = {
  theme: {
    extend: {
      fontFamily: {
        poppins: ["var(--font-poppins)", "sans-serif"],
      },
    },
  },
};
export default config;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why this is better than the "Manual Download" method&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Zero Cumulative Layout Shift (CLS): In the old way, text would "jump" when the font finished loading. Next.js 16 automatically adjusts the size of the fallback font so the transition is invisible.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Performance &amp;amp; Privacy: You get the speed of Google Fonts without actually making requests to Google’s servers. Everything is served from your own domain.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Automatic Subsetting: If you only need English characters, Next.js strips out the unused characters from the font file. This can make your font files up to 70% smaller than the ones you download manually.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Now The Final Step the result&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export default function Hero() {
  return (
    &amp;lt;h1 className="font-poppins font-bold text-3xl"&amp;gt;
      High Performance, Zero Effort.
    &amp;lt;/h1&amp;gt;
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;Found this helpful? Let’s build something together!&lt;/p&gt;

&lt;p&gt;🚀 &lt;strong&gt;Connect with me on LinkedIn&lt;/strong&gt;: &lt;a href="https://www.linkedin.com/in/abdullah-nasir-xee" rel="noopener noreferrer"&gt;Abdullah&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;📂 Check out my recent project: &lt;a href="https://play.google.com/store/apps/details?id=com.testingone" rel="noopener noreferrer"&gt;Tazakur&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;📧** Direct Inquiries**: (&lt;a href="mailto:abdullahnasir.xee@gmail.com"&gt;abdullahnasir.xee@gmail.com&lt;/a&gt;)&lt;/p&gt;

</description>
      <category>programming</category>
      <category>nextjs</category>
      <category>frontend</category>
      <category>fontfamily</category>
    </item>
    <item>
      <title>Deep Linking work Flow how it help me to connect directly to phone systems</title>
      <dc:creator>Abdullah Nasir</dc:creator>
      <pubDate>Wed, 07 Jan 2026 06:37:36 +0000</pubDate>
      <link>https://dev.to/abdullah_nasir/deep-linking-work-flow-how-it-help-me-to-connect-directly-to-phone-systems-fm1</link>
      <guid>https://dev.to/abdullah_nasir/deep-linking-work-flow-how-it-help-me-to-connect-directly-to-phone-systems-fm1</guid>
      <description>&lt;div class="ltag__link"&gt;
  &lt;a href="/abdullah_nasir" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3624522%2F54543bdb-5af2-4ce6-8abf-d68b2fd00abb.jpeg" alt="abdullah_nasir"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://dev.to/abdullah_nasir/react-native-linking-the-simple-guide-to-protocols-2lob" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;React Native Linking: The Simple Guide to Protocols&lt;/h2&gt;
      &lt;h3&gt;Abdullah Nasir ・ Jan 7&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#programming&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#reactnative&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#linking&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#expo&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


</description>
      <category>programming</category>
      <category>reactnative</category>
      <category>linking</category>
      <category>expo</category>
    </item>
    <item>
      <title>React Native Linking: The Simple Guide to Protocols</title>
      <dc:creator>Abdullah Nasir</dc:creator>
      <pubDate>Wed, 07 Jan 2026 06:35:53 +0000</pubDate>
      <link>https://dev.to/abdullah_nasir/react-native-linking-the-simple-guide-to-protocols-2lob</link>
      <guid>https://dev.to/abdullah_nasir/react-native-linking-the-simple-guide-to-protocols-2lob</guid>
      <description>&lt;p&gt;In React Native, the Linking module is the built-in interface used to interact with both incoming and outgoing app links. It allows you to open external URLs (like websites) or trigger system-level actions (like making a phone call or sending an email) using specific URL Schemes.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Understanding URL Schemes (Protocols)&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Every link you interact with has a Scheme (the part before the &lt;br&gt;
&lt;code&gt;://).&lt;/code&gt;&lt;br&gt;
 Your phone’s operating system uses this scheme to decide which app should handle the request.&lt;/p&gt;

&lt;p&gt;2.&lt;strong&gt;Core Methods: openURL vs canOpenURL&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Before you try to open a link, it is a best practice to check if the device actually has an app installed that can handle it.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Linking.canOpenURL(url): Returns a Promise that resolves to a boolean. It checks if there is an app installed that recognizes the scheme.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Linking.openURL(url): Attempts to open the link. If it fails (e.g., no email app is set up), it will throw an error.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Code Example: Phone &amp;amp; Email&lt;/strong&gt;&lt;br&gt;
Here is a reusable function to handle both "Call" and "Email" actions safely.&lt;br&gt;
&lt;/p&gt;


&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { Linking, Alert, Platform } from 'react-native';

const handleExternalLink = async (url) =&amp;gt; {
  try {
    const supported = await Linking.canOpenURL(url);

    if (supported) {
      await Linking.openURL(url);
    } else {
      Alert.alert("Error", `Don't know how to open this link: ${url}`);
    }

  } catch (error) {
    Alert.alert("An error occurred", error.message);
  }
};

-  Usage Examples:

&amp;lt;Button title="Call Support" onPress={() =&amp;gt; handleExternalLink('tel:+123456789')} /&amp;gt;

&amp;lt;Button title="Email Us" onPress={() =&amp;gt; handleExternalLink('mailto:hello@dev.com')} /&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Key Differences &amp;amp; Properties&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;_&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;tel: vs telprompt: (iOS Only)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;_On iOS, if you use tel:, the phone dials immediately. If you use telprompt:, the system shows a confirmation popup first asking the user if they really want to call. Most developers prefer telprompt: for better UX on iPhone.&lt;/p&gt;

&lt;p&gt;Email with Parameters&lt;br&gt;
The mailto: scheme can be extended to include a &lt;strong&gt;subject&lt;/strong&gt; and &lt;strong&gt;body&lt;/strong&gt; using standard URL query parameters:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mailto:support@example.com?subject=Help&amp;amp;body=I need assistance

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>programming</category>
      <category>reactnative</category>
      <category>linking</category>
      <category>expo</category>
    </item>
  </channel>
</rss>
