{"action":"created","issue":{"url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/11664","labels_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/11664/labels{/name}","comments_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/11664/comments","events_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/11664/events","html_url":"https://github.com/cocos2d/cocos2d-x/issues/11664","id":72105534,"number":11664,"title":"UI Text and setFontSize doesn't update in realtime","user":{"login":"DarioDP","id":6792464,"avatar_url":"https://avatars.githubusercontent.com/u/6792464?v=3","gravatar_id":"","url":"https://api.github.com/users/DarioDP","html_url":"https://github.com/DarioDP","followers_url":"https://api.github.com/users/DarioDP/followers","following_url":"https://api.github.com/users/DarioDP/following{/other_user}","gists_url":"https://api.github.com/users/DarioDP/gists{/gist_id}","starred_url":"https://api.github.com/users/DarioDP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DarioDP/subscriptions","organizations_url":"https://api.github.com/users/DarioDP/orgs","repos_url":"https://api.github.com/users/DarioDP/repos","events_url":"https://api.github.com/users/DarioDP/events{/privacy}","received_events_url":"https://api.github.com/users/DarioDP/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-04-30T09:08:14Z","updated_at":"2015-05-05T10:10:22Z","closed_at":null,"body":"I'm trying to make the Text inside a scrollview zoomable with pinching.\r\n\r\nI've a problem on updating, let me explain:\r\n\r\n```\r\nif (touches.size() >= 2) {\r\n  Touch *touch1 = (Touch *) touches.at(0);\r\n  Touch *touch2 = (Touch *) touches.at(1);\r\n\r\n  Vec2 curPosTouch1 = touch1->getLocationInView();\r\n  Vec2 curPosTouch2 = touch2->getLocationInView();\r\n  Vec2 prevPosTouch1 = touch1->getPreviousLocationInView();\r\n  Vec2 prevPosTouch2 = touch2->getPreviousLocationInView();\r\n\r\n  auto zoomFactor = curPosTouch1.distance(curPosTouch2) / prevPosTouch1.distance(prevPosTouch2);\r\n\r\n      textWidget->setFontSize(round(textWidget->getFontSize() * zoomFactor));\r\n//      textWidget->setScale(textWidget->getScale() * zoomFactor);\r\n\r\n}\r\n```\r\n\r\ntextWidget is a UI Text, I've a problem when using setFontSize in a listener OnTouchMoved, it updates the font size only when I release the touch not in realtime.\r\nInstead using setScale it updates in realtime, but obviously with a pixelation effect.\r\n\r\nIs there any way to force the update?\r\nOr it is a normal behaviour because I'm using TTF font and need to wait for recalculating the new font size?\r\n"},"comment":{"url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/comments/99018711","html_url":"https://github.com/cocos2d/cocos2d-x/issues/11664#issuecomment-99018711","issue_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/11664","id":99018711,"user":{"login":"andyque","id":785541,"avatar_url":"https://avatars.githubusercontent.com/u/785541?v=3","gravatar_id":"","url":"https://api.github.com/users/andyque","html_url":"https://github.com/andyque","followers_url":"https://api.github.com/users/andyque/followers","following_url":"https://api.github.com/users/andyque/following{/other_user}","gists_url":"https://api.github.com/users/andyque/gists{/gist_id}","starred_url":"https://api.github.com/users/andyque/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andyque/subscriptions","organizations_url":"https://api.github.com/users/andyque/orgs","repos_url":"https://api.github.com/users/andyque/repos","events_url":"https://api.github.com/users/andyque/events{/privacy}","received_events_url":"https://api.github.com/users/andyque/received_events","type":"User","site_admin":false},"created_at":"2015-05-05T10:10:22Z","updated_at":"2015-05-05T10:10:22Z","body":"@WenhaiLin  Please check this?"}}