{"id":37558,"date":"2019-06-05T00:00:00","date_gmt":"2019-06-04T18:30:00","guid":{"rendered":"https:\/\/git-staging.wpastra.com\/?post_type=docs&#038;p=37558"},"modified":"2022-09-02T11:51:23","modified_gmt":"2022-09-02T06:21:23","slug":"modify-font-display-property-value","status":"publish","type":"docs","link":"https:\/\/git-staging.wpastra.com\/es\/docs\/modify-font-display-property-value\/","title":{"rendered":"Modificar el valor de la propiedad font-display"},"content":{"rendered":"<p>La propiedad CSS font-display define c\u00f3mo se cargan y muestran los archivos de fuentes en el navegador. Lea un art\u00edculo informativo de CSS-TRICKS <a rel=\"noreferrer noopener\" aria-label=\"aqu\u00ed (se abre en una nueva pesta\u00f1a)\" href=\"https:\/\/css-tricks.com\/almanac\/properties\/f\/font-display\/\" target=\"_blank\">aqu\u00ed<\/a>. <\/p>\n\n\n\n<p>Puede modificar el valor de esta propiedad utilizando el siguiente filtro <\/p>\n\n\n\n<pre class=\"wp-block-code\" data-no-translation=\"\" data-no-auto-translation=\"\"><code>add_filter( 'astra_fonts_display_property', 'astra_replace_fallback_with_swap' );\nfunction astra_replace_fallback_with_swap( $property ) {\n$property = 'swap';\nreturn $property;\n}<\/code><\/pre>\n\n\n\n<p><strong>Nota:<\/strong> A\u00f1ada el c\u00f3digo anterior a <a rel=\"noreferrer noopener\" aria-label=\"child theme&#039;s functions.php file (opens in a new tab)\" href=\"https:\/\/git-staging.wpastra.com\/es\/docs\/add-custom-php-code\/#3.-in-child-theme\" target=\"_blank\">archivo functions.php del tema hijo<\/a>. <\/p>\n\n\n\n<p>Para comprobar la propiedad font-display, puede ir a una p\u00e1gina y pulsar Ctrl+U O hacer clic con el bot\u00f3n derecho del rat\u00f3n &gt; Ver fuente de la p\u00e1gina. <\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><a href=\"https:\/\/git-staging.wpastra.com\/wp-content\/uploads\/2019\/06\/Font-Display-property.jpg\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1200\" height=\"614\" src=\"https:\/\/git-staging.wpastra.com\/wp-content\/uploads\/2019\/06\/Font-Display-property.jpg\" alt=\"Font Display property\" class=\"wp-image-131673\" srcset=\"https:\/\/git-staging.wpastra.com\/wp-content\/uploads\/2019\/06\/Font-Display-property.jpg 1200w, https:\/\/git-staging.wpastra.com\/wp-content\/uploads\/2019\/06\/Font-Display-property-300x154.jpg 300w, https:\/\/git-staging.wpastra.com\/wp-content\/uploads\/2019\/06\/Font-Display-property-1024x524.jpg 1024w, https:\/\/git-staging.wpastra.com\/wp-content\/uploads\/2019\/06\/Font-Display-property-768x393.jpg 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/a><\/figure>","protected":false},"excerpt":{"rendered":"<p>La propiedad CSS font-display define c\u00f3mo se cargan y muestran los archivos de fuentes en el navegador. Lea un art\u00edculo informativo de CSS-TRICKS aqu\u00ed. Puede modificar el valor de esta propiedad utilizando el siguiente filtro Nota: A\u00f1ada el c\u00f3digo anterior al archivo functions.php del tema hijo. Para comprobar la propiedad font-display, puede ir a una p\u00e1gina y [...]<\/p>","protected":false},"author":20,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"default","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"docs_category":[2109],"docs_tag":[],"class_list":{"0":"post-37558","1":"docs","2":"type-docs","3":"status-publish","5":"docs_category-astra-theme-pro-filters"},"spectra_custom_meta":{"_wp_old_slug":[""],"_wp_page_template":["default"],"wpil_sync_report3":["1"],"wpil_links_inbound_internal_count":["2"],"wpil_links_inbound_internal_count_data":["a:2:{i:0;a:9:{s:3:\"url\";s:72:\"https:\/\/git-staging.wpastra.com\/docs\/modify-font-display-property-value\/\";s:8:\"url_real\";s:72:\"https:\/\/git-staging.wpastra.com\/docs\/modify-font-display-property-value\/\";s:4:\"host\";s:11:\"wpastra.com\";s:9:\"host_real\";s:11:\"wpastra.com\";s:8:\"internal\";b:1;s:7:\"post_id\";s:5:\"37583\";s:6:\"anchor\";s:7:\"See Doc\";s:15:\"added_by_plugin\";b:0;s:10:\"post_title\";s:13:\"Version 1.8.5\";}i:1;a:9:{s:3:\"url\";s:72:\"https:\/\/git-staging.wpastra.com\/docs\/modify-font-display-property-value\/\";s:8:\"url_real\";s:72:\"https:\/\/git-staging.wpastra.com\/docs\/modify-font-display-property-value\/\";s:4:\"host\";s:11:\"wpastra.com\";s:9:\"host_real\";s:11:\"wpastra.com\";s:8:\"internal\";b:1;s:7:\"post_id\";s:5:\"38914\";s:6:\"anchor\";s:7:\"See Doc\";s:15:\"added_by_plugin\";b:0;s:10:\"post_title\";s:25:\"Changelog for Astra Theme\";}}"],"wpil_links_outbound_internal_count":["2"],"wpil_links_outbound_internal_count_data":["a:2:{i:0;a:9:{s:3:\"url\";s:75:\"https:\/\/git-staging.wpastra.com\/docs\/add-custom-php-code\/#3.-in-child-theme\";s:8:\"url_real\";s:75:\"https:\/\/git-staging.wpastra.com\/docs\/add-custom-php-code\/#3.-in-child-theme\";s:4:\"host\";s:11:\"wpastra.com\";s:9:\"host_real\";s:11:\"wpastra.com\";s:8:\"internal\";b:1;s:7:\"post_id\";i:0;s:6:\"anchor\";s:32:\"child theme's functions.php file\";s:15:\"added_by_plugin\";b:0;s:10:\"post_title\";s:0:\"\";}i:1;a:9:{s:3:\"url\";s:84:\"https:\/\/git-staging.wpastra.com\/wp-content\/uploads\/2019\/06\/font-display-property.png\";s:8:\"url_real\";s:84:\"https:\/\/git-staging.wpastra.com\/wp-content\/uploads\/2019\/06\/font-display-property.png\";s:4:\"host\";s:11:\"wpastra.com\";s:9:\"host_real\";s:11:\"wpastra.com\";s:8:\"internal\";b:1;s:7:\"post_id\";i:0;s:6:\"anchor\";s:127:\"<img src=\"https:\/\/git-staging.wpastra.com\/wp-content\/uploads\/2019\/06\/font-display-property.png\" alt=\"\" class=\"wp-image-37570\"\/>\";s:15:\"added_by_plugin\";b:0;s:10:\"post_title\";s:0:\"\";}}"],"wpil_links_outbound_external_count":["1"],"wpil_links_outbound_external_count_data":["a:1:{i:0;a:9:{s:3:\"url\";s:57:\"https:\/\/css-tricks.com\/almanac\/properties\/f\/font-display\/\";s:8:\"url_real\";s:57:\"https:\/\/css-tricks.com\/almanac\/properties\/f\/font-display\/\";s:4:\"host\";s:14:\"css-tricks.com\";s:9:\"host_real\";s:14:\"css-tricks.com\";s:8:\"internal\";b:0;s:7:\"post_id\";i:0;s:6:\"anchor\";s:4:\"here\";s:15:\"added_by_plugin\";b:0;s:10:\"post_title\";s:0:\"\";}}"],"wpil_sync_report2_time":["2019-09-05T12:01:35+00:00"],"_edit_lock":["1662099744:65"],"_edit_last":["65"],"onesignal_meta_box_present":["1"],"onesignal_send_notification":[""],"site-sidebar-layout":["default"],"site-content-layout":["default"],"theme-transparent-header-meta":["default"],"_yoast_wpseo_content_score":["60"],"_ppc_meta_key":["a:8:{s:20:\"ppc_key5d92f85d42273\";s:60:\"Images &amp; Names Correctly. Title &amp; Alt Tags are Given\";s:8:\"ppc_key4\";s:15:\"Formatting Done\";s:8:\"ppc_key2\";s:23:\"Featured Image Assigned\";s:8:\"ppc_key3\";s:17:\"Category Selected\";s:8:\"ppc_key5\";s:15:\"Title is Catchy\";s:8:\"ppc_key6\";s:22:\"Social Images Assigned\";s:8:\"ppc_key7\";s:8:\"Done SEO\";s:8:\"ppc_key8\";s:28:\"Spelling and Grammar Checked\";}"],"tap_disable_autolinker":["no"],"tap_autolink_inside_heading":["global"],"tap_autolink_random_placement":["global"],"tap_post_autolinker_limit":["0"],"_yoast_wpseo_title":["How to Modify the Font-display Property Value?"],"_ht_kb_post_views_count":["8"],"_ht_kb_usefulness":["0"],"_ht_article_order_103":["37558"],"wp_last_modified_info":["September 2, 2022 @ 11:51 AM"],"wplmi_shortcode":["[lmt-post-modified-info]"],"views":["4495"],"helpful":["3"],"unhelpful":["2"],"redirects":["3"],"_lmt_disableupdate":["no"],"_wplmi_last_modified":["2022-09-02 11:51:23"],"rank_math_title":["How to Modify the Font-display Property Value?"],"rank_math_news_sitemap_robots":["index"],"rank_math_robots":["a:1:{i:0;s:5:\"index\";}"],"rank_math_analytic_object_id":["860"],"rank_math_seo_score":["20"],"rank_math_internal_links_processed":["1"],"pfd_related_docs":[""],"rank_math_og_content_image":["a:2:{s:5:\"check\";s:32:\"fe4dd2c0b88a7fc9586db09ca59fda44\";s:6:\"images\";a:1:{i:0;i:131673;}}"],"_wpml_media_duplicate":["1"],"_trp_automatically_translated_slug_es_ES":["modificar-el-valor-de-la-propiedad-font-display"],"_uag_page_assets":["a:9:{s:3:\"css\";s:2495:\".wp-block-uagb-container.uagb-block-debf2792 .uagb-container__shape-top svg{width: calc( 100% + 1.3px );}.wp-block-uagb-container.uagb-block-debf2792 .uagb-container__shape.uagb-container__shape-top .uagb-container__shape-fill{fill: rgba(51,51,51,1);}.wp-block-uagb-container.uagb-block-debf2792 .uagb-container__shape-bottom svg{width: calc( 100% + 1.3px );}.wp-block-uagb-container.uagb-block-debf2792 .uagb-container__shape.uagb-container__shape-bottom .uagb-container__shape-fill{fill: rgba(51,51,51,1);}.wp-block-uagb-container.uagb-block-debf2792 .uagb-container__video-wrap video{opacity: 1;}.wp-block-uagb-container.uagb-is-root-container .uagb-block-debf2792{max-width: 100%;width: 100%;}.wp-block-uagb-container.uagb-is-root-container.alignfull.uagb-block-debf2792 > .uagb-container-inner-blocks-wrap{--inner-content-custom-width: min( 100%, 1200px);max-width: var(--inner-content-custom-width);width: 100%;flex-direction: column;align-items: center;justify-content: center;flex-wrap: nowrap;row-gap: 0px;column-gap: 0px;}.wp-block-uagb-container.uagb-block-debf2792{box-shadow: 0px 0px   #00000070 ;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;margin-top: 0px !important;margin-bottom: 0px !important;margin-left: 0px;margin-right: 0px;overflow: visible;border-color: inherit;row-gap: 0px;column-gap: 0px;}@media only screen and (max-width: 976px) {.wp-block-uagb-container.uagb-is-root-container .uagb-block-debf2792{width: 100%;}.wp-block-uagb-container.uagb-is-root-container.alignfull.uagb-block-debf2792 > .uagb-container-inner-blocks-wrap{--inner-content-custom-width: min( 100%, 1024px);max-width: var(--inner-content-custom-width);width: 100%;}.wp-block-uagb-container.uagb-block-debf2792{padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;margin-top: 0px !important;margin-bottom: 0px !important;margin-left: 0px;margin-right: 0px;}}@media only screen and (max-width: 767px) {.wp-block-uagb-container.uagb-is-root-container .uagb-block-debf2792{max-width: 100%;width: 100%;}.wp-block-uagb-container.uagb-is-root-container.alignfull.uagb-block-debf2792 > .uagb-container-inner-blocks-wrap{--inner-content-custom-width: min( 100%, 767px);max-width: var(--inner-content-custom-width);width: 100%;flex-wrap: wrap;}.wp-block-uagb-container.uagb-block-debf2792{padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;margin-top: 0px !important;margin-bottom: 0px !important;margin-left: 0px;margin-right: 0px;}}\";s:2:\"js\";s:0:\"\";s:18:\"current_block_list\";a:5:{i:0;s:14:\"core\/paragraph\";i:1;s:9:\"core\/code\";i:2;s:10:\"core\/image\";i:3;s:14:\"uagb\/container\";i:4;s:14:\"core\/shortcode\";}s:8:\"uag_flag\";b:1;s:11:\"uag_version\";s:10:\"1777036730\";s:6:\"gfonts\";a:0:{}s:10:\"gfonts_url\";s:0:\"\";s:12:\"gfonts_files\";a:0:{}s:14:\"uag_faq_layout\";b:0;}"]},"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"trp-custom-language-flag":false},"uagb_author_info":{"display_name":"Anjali","author_link":"https:\/\/git-staging.wpastra.com\/es\/author\/anjalic\/"},"uagb_comment_info":0,"uagb_excerpt":"The font-display CSS property defines how font files are loaded and displayed by the browser. Read an informative article by CSS-TRICKS here. You can modify the value for this property using the following filter Note: Add above code to child theme&#8217;s functions.php file. To check the font-display property, you can go to a page and&hellip;","_links":{"self":[{"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/docs\/37558"}],"collection":[{"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/users\/20"}],"replies":[{"embeddable":true,"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/comments?post=37558"}],"version-history":[{"count":0,"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/docs\/37558\/revisions"}],"wp:attachment":[{"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/media?parent=37558"}],"wp:term":[{"taxonomy":"docs_category","embeddable":true,"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/docs_category?post=37558"},{"taxonomy":"docs_tag","embeddable":true,"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/docs_tag?post=37558"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}