word文本样式代码样式_使用文本样式表达创建真相来源

word文本样式代码样式

As of After Effects 17.0, you can use expressions to edit text styles in After Effects. Here’s why this would transform your workflow:

从After Effects 17.0开始,您可以使用表达式在After Effects中编辑文本样式。 这就是这将改变您的工作流程的原因:

  1. Title Design: Link multiple text layers to one source of truth, for consistency and precision.

    标题设计:将多个文本层链接到一个事实来源,以保持一致性和准确性。
  2. Save time: Don’t waste your precious mental energy and hours of the day clicking into individual text layers, Character and Paragraph panels, or even expression sliders controlling your text.

    节省时间:不要浪费您宝贵的精力和一天中的几个小时单击单个文本图层,“字符”和“段落”面板,甚至控制文本的表达滑块。
  3. Create Motion Graphics Templates (mogrts): Link your source(s) of typographic truth to the Essential Graphics panel, so that you or others can edit them with flexibility in After Effects and Premiere.

    创建运动图形模板(迁移):将印刷真相源链接到“基本图形”面板,以便您或其他人可以在After Effects和Premiere中灵活地对其进行编辑。

Example:

例:

Image for post

You have three text layers. You want to maintain the same styling and source text for all, but you want to control Paragraph Alignment in the Essential Graphics panel.

您有三个文本层。 您希望为所有对象保留相同的样式和源文本,但是要在“基本图形”面板中控制“段落对齐”。

For the skeptics: Yes, you can manually change the paragraph alignment, but you’re likely pushing the same copy to multiple comps at various sizes. The After Effects gods gave us new features so that maybe we can work more precisely and intelligently. Keep things simple for simpler projects, and go a little complex for more complex projects.

对于怀疑者:是的,您可以手动更改段落的对齐方式,但是您可能会将同一副本推入各种大小的多个伴奏中。 After Effects神灵为我们提供了新功能,以便我们可以更精确,更智能地工作。 对于较简单的项目,请保持简单;对于较复杂的项目,则应使它变得有些复杂。

Recipe:

食谱:

  1. Use expressions to link the three text layers to one master text layer (your source of truth).

    使用表达式将三个文本层链接到一个主文本层(您的真相来源)。
  2. Create a Dropdown Menu Control with Paragraph Alignment options.

    使用段落对齐选项创建一个下拉菜单控件。

Add this expression to each of the three text layers:

将此表达式添加到三个文本层中的每个:

var t = thisComp.layer("MASTER TITLE").text.sourceText; var fontSize = t.style.fontSize; var leading = t.style.leading; style = t.style; styleA = style.setFontSize(fontSize); styleB = styleA.setText(t); styleC = styleB.setLeading(leading);

var t = thisComp.layer("MASTER TITLE").text.sourceText; var fontSize = t.style.fontSize; var leading = t.style.leading; style = t.style; styleA = style.setFontSize(fontSize); styleB = styleA.setText(t); styleC = styleB.setLeading(leading);

Explanation, line by line:

逐行说明:

var t = thisComp.layer("MASTER TITLE").text.sourceText;

var t = thisComp.layer("MASTER TITLE").text.sourceText;

Declare a variable, t, and return the value of your master text layer’s sourceText.

声明一个变量t,并返回主文本层的sourceText的值。

var fontSize = t.style.fontSize;

var fontSize = t.style.fontSize;

Declare a variable, fontSize, and return the fontSize of t.

声明一个变量fontSize ,并返回t的fontSize。

var leading = t.style.leading;

var leading = t.style.leading;

Declare a variable, leading, and return the leading of t.

声明一个变量, leading ,并返回t的领先。

style = t.style;

style = t.style;

Adding style to the end is the same as using getStyleAt(0); which means to get the style of t at Character Index 0. You can also use getStyleAt(n, x); to return the Character Index at Time (n = character index, x = time in seconds).

最后添加style与使用getStyleAt(0); 您也可以使用getStyleAt(n, x);来获取字符索引0处的t样式getStyleAt(n, x); 返回时间的字符索引(n =字符索引,x =以秒为单位的时间)。

The variables styleA, styleB, and styleC combine Set Functions using the variables we declared above: fontSize, sourceText, and leading. I’ve separated each style for clarity, but you can also write everything in longform.

变量styleA,styleB和styleC使用我们上面声明的变量fontSet,sourceText和Lead组合了Set函数。 为了清楚起见,我将每种样式分开,但您也可以用长格式编写所有内容。

Now that we’ve linked the text layers to a single style, let’s create a Dropdown Menu Control so that we can access Left, Center, or Right paragraph alignment in the Essential Graphics Panel.

现在,我们已经将文本图层链接到一个样式,现在我们创建一个下拉菜单控件,以便我们可以在Essential Graphics Panel中访问Left,Center或Right段落对齐方式。

Use this expression on the opacity of your text layers (but make sure their visibility is still turned on):

在文本图层的不透明度上使用此表达式(但请确保它们的可见性仍处于打开状态):

var x = thisComp.layer("CONTROL").effect("paragraphAlign")("Menu").value; if (x == 1) 100; else 0

var x = thisComp.layer("CONTROL").effect("paragraphAlign")("Menu").value; if (x == 1) 100; else 0

Explanation, line by line:

逐行说明:

var x = thisComp.layer("CONTROL").effect("paragraphAlign")("Menu").value;

var x = thisComp.layer("CONTROL").effect("paragraphAlign")("Menu").value;

Declare a variable x, and return the value of a Dropdown Menu Item. The value of a Dropdown Menu item is always a number, even if you rename the label.

声明一个变量x,并返回一个下拉菜单项的值。 即使重命名标签,“下拉菜单”项的值也始终是数字。

if (x == 1) 100; else 0

if (x == 1) 100; else 0

If x is equal 1, the opacity will be 100. Otherwise, it will be zero.

如果x等于1,则不透明度将为100。否则,它将为零。

Note that you may encounter the triple equals operator, or the strict equality operator, ===, e.g., x === 1. This operator is special because it tests for both value (e.g., 5) and type (e.g., number).

请注意,您可能会遇到三重等于运算符或严格等于运算符=== ,例如x === 1 。 该运算符很特殊,因为它同时测试值(例如5)和类型(例如数字)。

In this example, x === 1 will still work. However, if you type x === "1", then the test will return false because the Dropdown Menu item values are always numbers, not strings.

在此示例中, x === 1仍然有效。 但是,如果键入x === "1" ,则测试将返回false,因为下拉菜单项的值始终是数字,而不是字符串。

Done! Now read more about text styling expressions over at Adobe.

做完了! 现在,在Adobe上阅读有关文本样式表达的更多信息。

Originally published at https://bytanchan.com on March 21, 2020.

最初于 2020年3月21日 https://bytanchan.com 发布

翻译自: https://uxdesign.cc/creating-your-source-of-truth-with-text-styling-expressions-ee38bebe7c35

word文本样式代码样式

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/274733.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

前端框架源码解读之Vite

前端工具链十年盘点:https://mp.weixin.qq.com/s/FBxVpcdVobgJ9rGxRC2zfgWebpack、Rollup 、Esbuild、Vite ?webpack: 基于 JavaScript 开发的前端打包构建框架,通过依赖收集,模块解析,生成 chunk,最终输出生成的打包…

hp-ux_UX中的格式塔-或-为什么设计师如此讨厌间距

hp-uxI’ve been lucky so far in my design career to have worked with engineers that seem genuinely interested in learning about design. Perhaps, as mentioned in the title, it’s more about them trying to figure out why it matters so much to us that there i…

JavaScript 数组新增 4 个非破坏性方法!

大家好,我是若川。持续组织了8个月源码共读活动,感兴趣的可以点此加我微信 ruochuan12 参与,每周大家一起学习200行左右的源码,共同进步。同时极力推荐订阅我写的《学习源码整体架构系列》 包含20余篇源码文章。历史面试系列。另外…

自行车改装电动车怎么样_电动车听起来应该是什么样?

自行车改装电动车怎么样The sound of an all-electric car accelerating doesn’t have to sound like a standard combustion engine, It could sound like anything.全电动汽车加速的声音不必听起来像是标准的内燃机,它可以听起来像任何东西。 These were the wor…

谷歌pay破解_Google Pay缺少Google闻名的一件事-UX案例研究

谷歌pay破解Disclaimer: The views expressed in the blog post is purely based on personal experience. It was not influenced by any external factor.When Google launched Tez (now Google Pay) in India during 2017, their primary goal was to design a simple payme…

进阶高级前端,这位大前端架构师一定不能错过

今天给大家介绍一位好朋友:这波能反杀:一位拥有十年工作经验,对学习方法有独到理解的资深大前端架构师。一、博客早在 2017 年初,波神在简书平台以《前端基础进阶》为名,更新了一系列优质文章,获得大量认可…

memcached应用策略(转)

memcached应用策略(转)(2012-04-05 11:10:02) 转载▼标签: memcached 应用策略 it分类: linux_c memcached应用策略memcached 主要的作用是为减轻大访问量对数据库的冲击,所以一般的逻辑是首先从memcached中读取数据&a…

突然讨厌做前端,讨厌代码_为什么用户讨厌重新设计

突然讨厌做前端,讨厌代码重点 (Top highlight)The core of design thinking is to only design something that will bring value and fill the gap in consumer needs. Right? Why else would one design something that no one asked for? While that may be true to some …

那些年我面过的「六年经验」的初级工程师

大家好,我是若川。持续组织了8个月源码共读活动,感兴趣的可以 点此加我微信ruochuan12 参与,每周大家一起学习200行左右的源码,共同进步。同时极力推荐订阅我写的《学习源码整体架构系列》 包含20余篇源码文章。历史面试系列。另外…

更多信息请关注微信公众号_为什么我们更多地关注表面异常?

更多信息请关注微信公众号Don’t you feel lucky to find a single seasoned curly fry in your bunch of plain old boring french fries? Do you remember highlighting important texts of your study materials before the exams? Both situations might seem irrelevant…

eclipse中的汉字极小的解决方案(转载)

eclipse中的汉字极小的解决方案(转载) 可能新装了eclipse后,写java代码的时候发现,写注释的时候发现,汉字小的可怜,网上搜一下,又是改字体又是设置字体大小,试用后发现都不是针对这个的方法。 无奈在自己摸…

面试官经常问的观察者模式如何实现~

大家好,我是若川。持续组织了8个月源码共读活动,感兴趣的可以 点此加我微信ruochuan12 参与,每周大家一起学习200行左右的源码,共同进步。同时极力推荐订阅我写的《学习源码整体架构系列》 包含20余篇源码文章。历史面试系列。另外…

旅行者 问题_门槛项目:没有旅行者回到他的原籍城市。

旅行者 问题Sohini Mukherjee| MFA| Spring 2020Sohini Mukherjee | 外交部| 2020年Spring Artivive app to see the full Artivive应用程序可查看完整的#AR experience.#AR体验。 Prompt:提示: As second semester, first year graduate students, you are at a …

产品经理懂技术=流氓会武术(zz)

最近七年,我都在做互联网产品,其中前五年分别在创业公司和上市公司里,做别人的产品;近两年在创业,做自己的产品。 我的体会是:产品经理需要懂技术,创业者尤其需要。但前提是你总觉得有股憋不住的…

技术人的七大必备特质

大家好,我是若川。持续组织了8个月源码共读活动,感兴趣的可以 点此加我微信ruochuan12 参与,每周大家一起学习200行左右的源码,共同进步。同时极力推荐订阅我写的《学习源码整体架构系列》 包含20余篇源码文章。历史面试系列。另外…

figma下载_在Figma中进行原型制作的技巧和窍门

figma下载自定义过渡和微交互 (Custom transitions and micro-interactions) Yep, I know that there are a lot of useful built-in transition effects in Figma already, but here I want to talk about custom micro-interactions, complicated transitions and show you h…

不想当全栈的设计师不是_但我不想成为产品设计师

不想当全栈的设计师不是重点 (Top highlight)I’ve made a huge mistake, I thought to myself, as a realization washed over me in the middle of an interview for a product design role.我对自己想,我犯了一个巨大的错误,因为在接受产品设计职务的…

学习 WCF (6)--学习调用WCF服务的各种方法

来自:http://www.cnblogs.com/gaoweipeng/archive/2009/07/26/1528263.html 根据不同的情况,我们可以用不同的方法调用WCF服务,本文简单总结了一下调用WCF的一些方法(代理类,Ajax...),分享给大家。开发工具调用WCF 这中…

[科普文] Vue3 到底更新了什么?

Vue3 已经发布一段时间了,这个版本从底层实现到上层 API 设计都发生了非常大的变化,但具体改变了些什么呢?一起简单盘点下:一、Composition API使用传统的option配置方法写组件的时候问题,随着业务复杂度越来越高&…

ipados_如何设计具有最新iPadOS 14功能的出色iPad应用

ipadosWe all know that iPad Pro already has a seriously powerful computing power and that it’s possible to create meaningful stuff with Apple Pen.我们都知道iPad Pro已经具有强大的计算能力,并且可以使用Apple Pen创建有意义的东西。 But do we really…