{"action":"created","issue":{"url":"https://api.github.com/repos/PistonDevelopers/graphics/issues/983","labels_url":"https://api.github.com/repos/PistonDevelopers/graphics/issues/983/labels{/name}","comments_url":"https://api.github.com/repos/PistonDevelopers/graphics/issues/983/comments","events_url":"https://api.github.com/repos/PistonDevelopers/graphics/issues/983/events","html_url":"https://github.com/PistonDevelopers/graphics/issues/983","id":97474602,"number":983,"title":"Allow texture aliases for `CharacterCache`","user":{"login":"bvssvni","id":1743862,"avatar_url":"https://avatars.githubusercontent.com/u/1743862?v=3","gravatar_id":"","url":"https://api.github.com/users/bvssvni","html_url":"https://github.com/bvssvni","followers_url":"https://api.github.com/users/bvssvni/followers","following_url":"https://api.github.com/users/bvssvni/following{/other_user}","gists_url":"https://api.github.com/users/bvssvni/gists{/gist_id}","starred_url":"https://api.github.com/users/bvssvni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bvssvni/subscriptions","organizations_url":"https://api.github.com/users/bvssvni/orgs","repos_url":"https://api.github.com/users/bvssvni/repos","events_url":"https://api.github.com/users/bvssvni/events{/privacy}","received_events_url":"https://api.github.com/users/bvssvni/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/PistonDevelopers/graphics/labels/discussion","name":"discussion","color":"bfe5bf"},{"url":"https://api.github.com/repos/PistonDevelopers/graphics/labels/draft","name":"draft","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-27T14:19:51Z","updated_at":"2015-08-31T10:22:21Z","closed_at":null,"body":"Currently the design of `Character` is:\r\n\r\n```Rust\r\npub struct Character<T: ImageSize> {\r\n    /// The offset of character.\r\n    pub offset: [f64; 2],\r\n    /// The size of character, including space.\r\n    pub size: [f64; 2],\r\n    /// The texture of the character.\r\n    pub texture: T,\r\n}\r\n```\r\n\r\nThis could be changed to:\r\n\r\n```Rust\r\npub struct Character<T: ImageSize> {\r\n    /// The offset of character.\r\n    pub offset: [f64; 2],\r\n    /// The size of character, including space.\r\n    pub size: [f64; 2],\r\n    /// The texture of the character.\r\n    pub texture: Rc<T>,\r\n}\r\n```\r\n\r\nThen use `Image::src_rect` when drawing in `Text`.\r\n\r\nThis will allow both single texture per character and a shared texture alias for multiple characters."},"comment":{"url":"https://api.github.com/repos/PistonDevelopers/graphics/issues/comments/136325485","html_url":"https://github.com/PistonDevelopers/graphics/issues/983#issuecomment-136325485","issue_url":"https://api.github.com/repos/PistonDevelopers/graphics/issues/983","id":136325485,"user":{"login":"bvssvni","id":1743862,"avatar_url":"https://avatars.githubusercontent.com/u/1743862?v=3","gravatar_id":"","url":"https://api.github.com/users/bvssvni","html_url":"https://github.com/bvssvni","followers_url":"https://api.github.com/users/bvssvni/followers","following_url":"https://api.github.com/users/bvssvni/following{/other_user}","gists_url":"https://api.github.com/users/bvssvni/gists{/gist_id}","starred_url":"https://api.github.com/users/bvssvni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bvssvni/subscriptions","organizations_url":"https://api.github.com/users/bvssvni/orgs","repos_url":"https://api.github.com/users/bvssvni/repos","events_url":"https://api.github.com/users/bvssvni/events{/privacy}","received_events_url":"https://api.github.com/users/bvssvni/received_events","type":"User","site_admin":false},"created_at":"2015-08-31T10:22:21Z","updated_at":"2015-08-31T10:22:21Z","body":"The problem with returning `&T` is that you can not use it with `Rc`."}}